clicking inside an webbrowsercontrol
i've got a form containing a webbrowser control, visiting a page containing a flash game, this is what i want to do:
i want to send a click with PostMessage clicking inside the webbrowser @ somewhere(X,Y) on the flash game? anyone got an idea?
i've tried to use "PAT or JK's API SPY" to get the handle of the webbrowser, got a few diffrent handles, tried them all no success =( (copied and pasted:)
Dim thunderformdc As Long, shellembedding As Long, shelldocobjectview As Long
Dim internetexplorerserver As Long, shockwaveb As Long, imlwincls As Long
thunderformdc = FindWindow("thunderformdc", vbNullString)
shellembedding = FindWindowEx(thunderformdc, 0&, "shell embedding", vbNullString)
shelldocobjectview = FindWindowEx(shellembedding, 0&, "shell docobject view", vbNullString)
internetexplorerserver = FindWindowEx(shelldocobjectview, 0&, "internet explorer_server", vbNullString)
shockwaveb = FindWindowEx(internetexplorerserver, 0&, "shockwave_8.5.0.324:0b967438", vbNullString)
imlwincls = FindWindowEx(shockwaveb, 0&, "imlwincls", vbNullString)
imlwincls = FindWindowEx(imlwincls, 0&, "imlwincls", vbNullString)
imlwincls = FindWindowEx(imlwincls, 0&, "imlwincls", vbNullString)
i also use this code:
Public Function MakeWord(ByVal LoWord As Integer, ByVal HiWord As Integer) As Long
MakeWord = (HiWord * &H10000) + (LoWord And &HFFFF&)
End Function
'example trying with thunderformdc :\.. not working even though
' i've resized the webbrowsercontrol to cover the whole form :\
dword = MakeWord(X,Y)
Call PostMessage(thunderformdc, WM_LBUTTONDOWN, 0&, dword)
Call PostMessage(thunderformdc, WM_LBUTTONUP, 0&, dword)
Thanks! Help Is Heavily Appreciated!