|
-
Feb 5th, 2000, 11:16 AM
#1
Thread Starter
Addicted Member
Let's say I have program that a user can enter some text into a textbox (txtDetails). And there is a seperate 3rd party program that has a form with a single text box on it.
If I already know the 3rd party program's textbox hWnd (238), how do I properly paste txtDetails.Text in it's text box?
Any help will be greatly appreciated and certainly rewarded with my undying graditude,
Daniel Christie
-
Feb 5th, 2000, 12:46 PM
#2
Yuo can use the SendMessage API with the WM_SETTEXT Constant, ie.
Code:
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" (ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, lParam As Any) As Long
Private Const WM_SETTEXT = &HC
Private Sub Command1_Click()
Dim sText As String
sText = Text1
Call SendMessage(lHwnd, WM_SETTEXT, Len(sText), ByVal sText)
End Sub
Where lHwnd is the WindowHandle of the Textbox in the 3rd Party App.
------------------
Aaron Young
Analyst Programmer
[email protected]
[email protected]
-
Feb 5th, 2000, 02:17 PM
#3
Thread Starter
Addicted Member
Thank you very, very much Aaron
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|