Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

How do i send a string to a windows dialog

Posted on 1998-03-28
11
Medium Priority
?
161 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
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 

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
 

Author Comment

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

Accepted Solution

by:
pjdb earned 200 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

VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

Question has a verified solution.

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

Hello everybody This Article will show you how to validate number with TEdit control, What's the TEdit control? TEdit is a standard Windows edit control on a form, it allows to user to write, read and copy/paste single line of text. Usua…
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…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Screencast - Getting to Know the Pipeline

963 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