|
-
May 30th, 2007, 04:11 PM
#5
Thread Starter
Hyperactive Member
Re: Postmessage - x,y coordinates wrong (MakeDWord)
I was trying the postmessage technique in such an easy situation, to get used to it.
I'm now back to my primary goal... This might go over your knowledge, if not, I'll very gladly receive your help.
I had an entire empty form, now I covered it up entirely with a webbrowser control. I'll want to simulate click on it... WITH postmessage. No Mouseevent, since I'd want the whole solution to work when the app is even minimzed.
I've been told to get the webbrowser hwnd that way:
Code:
Dim webhwnd as Long
webhwnd = FindWindowEx(Me.hwnd, 0, "Shell Embedding", vbNullString)
I then tried:
Code:
Call PostMessage(webwhnd, WM_LBUTTONDOWN, 0&, ByVal MakeDWord(Int(Rnd * 7000), Int(Rnd * 7000)))
I've watched the webbrowser with Winspector, and can see it reacting to me clicking the mouse here and there in the browser, but postmessage doesn't seem to reach the browser as Winspector doesn't show up anything.
I'll make some further tests... meanwhile, if that's something you already did, I'm open to all the code you might have handy 
Thanks again, pal
(Edit: I'm used to different webbrowser techniques to click buttons, dropdowns, edit value or extract links and stuff - but in my case, I will need to click at x,y a couple of time)
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
|