[Resolved][VB6] 'Hidden Mouse'
I was wondering if there is a way to simulate mouse movement/clicking in a VB6 application without having it in focus. Like my title says a hidden mouse. Perhaps i have a window completely over my VB app, the mouse can't click the application if there is something over it. I know there are ways to control the mouse/cursor, and i know how to do this. If anyone could lead me in the right direction that would be great.
Re: [Resolved][VB6] 'Hidden Mouse'
That is nearly impossible. It is actually not too hard if you leave the window open but i don't recommend you even ask this question in this forum because some people might take it that you are wanting to make a program to cheat on flash games. This is against forum rules.
Re: [Resolved][VB6] 'Hidden Mouse'
Quote:
Originally Posted by Lord Orwell
That is nearly impossible.
I beg to differ there my lord ^_^
On a command button or pictures MouseUp Sub, call GetWindow
It saves the window handle in selwnd
Paste this into a module
Code:
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Declare Function WindowFromPoint Lib "user32" (ByVal xPoint As Long, ByVal yPoint As Long) As Long
Public Type POINTAPI
x As Long
y As Long
End Type
public selwnd as long
Sub GetWindow()
Dim mousexy As POINTAPI
GetCursorPos mousexy
selwnd = WindowFromPoint(mousexy.x, mousexy.y)
End Sub
and if you do not want to do that, you may want to look at : http://cruels.net/index.php?showtopic=3266
I have no idea what you plan on using this for, I am just supplying code, but be careful from now on.
Re: [Resolved][VB6] 'Hidden Mouse'
he said flash animation which means it's in a web browser. The hard part of this is getting the handle to the flash animation. It is possible to get the handle to the browser window, but even this is not exactly easy.
Re: [Resolved][VB6] 'Hidden Mouse'
Quote:
Originally Posted by Lord Orwell
he said flash animation which means it's in a web browser. The hard part of this is getting the handle to the flash animation. It is possible to get the handle to the browser window, but even this is not exactly easy.
I said exactly what i meant, the shockwave flash component. It loads the .swf directly. And thank you jazz.
Re: [Resolved][VB6] 'Hidden Mouse'
don't forget to rate the people who helped :thumb:
and no problem
Re: [Resolved][VB6] 'Hidden Mouse'
ok then sorry. It is a form control then? I have never tried putting a shockwave form on a control but i can see how that would be very useful. All the demo disks from pc world run that way.