Solved

How do i send a string to a windows dialog

Posted on 1998-03-28
11
153 Views
Last Modified: 2010-04-06
How do i send a text-string to a windows dialog (like the login dialog).
Can someone send a source?
0
Comment
Question by:tomeknik
  • 3
  • 3
  • 2
  • +2
11 Comments
 

Expert Comment

by:fant0m
ID: 1360978
You can try MessageDialog() or some API calls, I suggest looking in the help.
0
 

Expert Comment

by:fant0m
ID: 1360979
You can try MessageDialog() or some API calls, I suggest looking in the help.
0
 

Author Comment

by:tomeknik
ID: 1360980
Edited text of question
0
 

Expert Comment

by:dr_gonzo
ID: 1360981
If it is a edit-box and you have the hwnd to it, you can use SetWindowText (covered in Win32.hlp)
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1360982
You can also send wm_char messages to the window and thus type the text character by character. This is the same as actually typing it since when typing in a window all characters are send to the underlying window as windows messages ...
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 

Author Comment

by:tomeknik
ID: 1360983
Adjusted points to 100
0
 
LVL 1

Accepted Solution

by:
pjdb earned 100 total points
ID: 1360984
try this code

function SendKeys(Keys:string):boolean;
var
      hw:hwnd;
      i:byte;
Begin
      hw:=getfocus;
      If hw<>0 Then
      begin
            for i:=1 to length(keys) do
                  postmessage(hw, wm_char, word(keys[i]), 1);
            result:=true;
      end
      else
            result:=false;
End;      {SendKeys}

JDB
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1360985
As I said, yes ...
0
 
LVL 1

Expert Comment

by:pjdb
ID: 1360986
Sorry gysbert1, i've take your answer. In fact i've read the question and see no answer so i've made a cut and paste from a library of mine.
Sorry agian

JDB
0
 
LVL 2

Expert Comment

by:gysbert1
ID: 1360987
No apology needed ! I did not have the time to post the code. You deserve the points ...
0
 
LVL 1

Expert Comment

by:pjdb
ID: 1360988
Tomeknik, Is it working fine?

JDB
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

The uses clause is one of those things that just tends to grow and grow. Most of the time this is in the main form, as it's from this form that all others are called. If you have a big application (including many forms), the uses clause in the in…
Introduction Raise your hands if you were as upset with FireMonkey as I was when I discovered that there was no TListview.  I use TListView in almost all of my applications I've written, and I was not going to compromise by resorting to TStringGrid…
This tutorial gives a high-level tour of the interface of Marketo (a marketing automation tool to help businesses track and engage prospective customers and drive them to purchase). You will see the main areas including Marketing Activities, Design …
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now