|
-
Nov 20th, 2002, 08:40 AM
#1
Thread Starter
Member
how can i send words to other app's text from my app
how can i send words to other app's text from my app?
i want use the sendwindowtext() ,but i don't know the name of the form ,i only know the hwnd of the app and the name of the text whice is i want to send words to. how can i do.
I am a vb fine,
but my English was poor.
-
Nov 20th, 2002, 09:44 AM
#2
PowerPoster
VB Code:
Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" _
(ByVal hWndParent As Long, ByVal hWndChildAfter As Long, _
ByVal lpszClassName As String, ByVal lpszWindowCaption As String) As Long
Private Declare Function SendMessage Lib "user32" Alias "SendMessageA" ( _
ByVal hwnd As Long, ByVal wMsg As Long, _
ByVal wParam As Long, ByVal lParam As String) As Long
Private Const WM_SETTEXT As Long = &HC
Dim hwndTxtBox As Long
hwndTxtBox = FindWindowEx("<Window handle>", 0&, vbNullString, "<text box name>")
SendMessage hwndTxtBox, WM_SETTEXT, 0&, "MY String"
-
Nov 20th, 2002, 02:18 PM
#3
Junior Member
You could use a MS Winsock Control
[vbcode]
Start:
'...thinks... ...remembers... ...forgets...
If Not gotanswer Then
GoTo Start
Else
'dur - it'l never get here
End If
[/vbcode]
-
Nov 20th, 2002, 03:00 PM
#4
PowerPoster
While definitely a way to accomplish the goal, wouldn't it be overkill if he already knows the handle?
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
|