How can i use vb to send information to a java window in ie without using api
Printable View
How can i use vb to send information to a java window in ie without using api
I don't think it's going to be easy....the easiest way to send messages to other programs, is to use the FindWindow API to find the program you want to send messages to, and then you the SendMessage API to send the actual message.
Ok then that means I need to figure this api thing out.
I'm told to use spy ++ to find the api thingy but when
I do I see so many things I don't know which is what I need
wanna fill me in?
Use Spy++ to find the exact name of the window you want to send messages to, then use the FindWindow and SendMessage API.
I have indcluded a small sample that can control WinAmp:
Code:Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
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
Const WM_KEYDOWN = &H100
Private Sub Command1_Click()
Dim hWinamp As Long
'Get the hWnd of Winamp
hWinamp = FindWindow("Winamp v1.x", vbNullString)
'Send the X button to Winamp
SendMessage hWinamp, WM_KEYDOWN, vbKeyZ, 0
End Sub
OK
question for you mr. helpful
'Get the hWnd of Winamp
hWinamp = FindWindow("Winamp v1.x", vbNullString)
what is the winamp v1.x and what is its significance cause it works even though im usin winamp2.5 so i that just destroys any remote clue I had about that part
ok i think i understand that where "winamp v1.x" i would put IEFrame if i wanted to do it to internet explorer? I'm tryin multiple programs and the only one it will even work for is winamp (im just changin the winamp v1.x to whatever is in its place for that diff program)
WELL i put ieframe since that was class name but no i dont know cause i wanna be able to send text to that address box but i dont know if someon could please tell me what to put i would greatly appreciate it