Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 163
  • Last Modified:

How do i send a string to a windows dialog

How do i send a text-string to a windows dialog (like the login dialog).
Can someone send a source?
0
tomeknik
Asked:
tomeknik
  • 3
  • 3
  • 2
  • +2
1 Solution
 
fant0mCommented:
You can try MessageDialog() or some API calls, I suggest looking in the help.
0
 
fant0mCommented:
You can try MessageDialog() or some API calls, I suggest looking in the help.
0
 
tomeknikAuthor Commented:
Edited text of question
0
What does it mean to be "Always On"?

Is your cloud always on? With an Always On cloud you won't have to worry about downtime for maintenance or software application code updates, ensuring that your bottom line isn't affected.

 
dr_gonzoCommented:
If it is a edit-box and you have the hwnd to it, you can use SetWindowText (covered in Win32.hlp)
0
 
gysbert1Commented:
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
 
tomeknikAuthor Commented:
Adjusted points to 100
0
 
pjdbCommented:
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
 
gysbert1Commented:
As I said, yes ...
0
 
pjdbCommented:
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
 
gysbert1Commented:
No apology needed ! I did not have the time to post the code. You deserve the points ...
0
 
pjdbCommented:
Tomeknik, Is it working fine?

JDB
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

  • 3
  • 3
  • 2
  • +2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now