Can Anyone advise?
i found the following code online: -
Public Declare Auto Function SetCursorPos Lib "User32.dll" (ByVal X As Integer, ByVal Y As Integer) As Long
-
Public Declare Auto Function GetCursorPos Lib "User32.dll" (ByRef lpPoint As Point) As Long
-
Public Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)
-
Public Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
-
Public Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
-
Public Const MOUSEEVENTF_MIDDLEDOWN = &H20 ' middle button down
-
Public Const MOUSEEVENTF_MIDDLEUP = &H40 ' middle button up
-
Public Const MOUSEEVENTF_RIGHTDOWN = &H8 ' right button down
-
Public Const MOUSEEVENTF_RIGHTUP = &H10 ' right button up
-
When i use this code was was part of the code i found: -
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 0)
-
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
-
I get an error...
Please look at attchment...
Can anyone explain it?
James
1 1963
Never mind..
This seems to work now... -
Declare Sub mouse_event Lib "user32" Alias "mouse_event" (ByVal dwFlags As Integer, ByVal dx As Integer, ByVal dy As Integer, ByVal cButtons As Integer, ByVal dwExtraInfo As Integer)
-
Private Const MOUSEEVENTF_ABSOLUTE = &H8000 ' absolute move
-
Private Const MOUSEEVENTF_LEFTDOWN = &H2 ' left button down
-
Private Const MOUSEEVENTF_LEFTUP = &H4 ' left button up
-
Private Const MOUSEEVENTF_MOVE = &H1 ' mouse move
-
Private Const MOUSEEVENTF_MIDDLEDOWN = &H20
-
Private Const MOUSEEVENTF_MIDDLEUP = &H40
-
Private Const MOUSEEVENTF_RIGHTDOWN = &H8
-
Private Const MOUSEEVENTF_RIGHTUP = &H10
-
-
mouse_event(MOUSEEVENTF_LEFTDOWN, 0, 0, 0, 1)
-
mouse_event(MOUSEEVENTF_LEFTUP, 0, 0, 0, 0)
-
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Chandika |
last post by:
Hi all,
One of my database was suspected, So I try to recover database then it
gives this error
Err. 823 Torn Page Detected
823, ... 24, spid51 i/o error Torn Page (Detected)
during read...
|
by: Tim Reynolds |
last post by:
I support a .Net application running on a SERVER accessing MF Db2
data. Occasionally, we have some type of connection problem that we
have been unable to debug up to this point. We typically...
|
by: Laura |
last post by:
I've just installed the DB2 Run-time client in a Solaris machine. Then
I finnish the installation configuring the connection:
1. machine catalog was OK:
==========================
$ db2 catalog...
|
by: Clunixchit |
last post by:
How can i read lines of a file and place each line read in an array?
for exemple;
array=line1
array=line2
...
|
by: Marek |
last post by:
Hi
I'm trying to call a native C++ dll using the following code (both C# and
C++ code segments included). When I make the call to the method
(AddTwoDoubles) that has no return value all is fine. ...
|
by: MJKulangara |
last post by:
I have an ap written in vb.net using 1.2 framework that makes a call to
a c++ dll. The executable I create runs just fine, but when I run the
ap in debug mode I get a PInvokeStackImbalance error....
|
by: urbansound |
last post by:
Hi,
I'm having trouble tracking down a PInvoke error in the MySqlDriverCS lib, which is detected even in the author's samples converted to VS v8 .Net 2.0.
The calling maze is provided, but the...
|
by: raghavendra2007 |
last post by:
Hi,
I am trying to develop the ScreenReader in C#, I need to use IAccessibility to access the system events. Before that I should require to get the IAccesibility object using...
|
by: John M. Gamble |
last post by:
I'm getting this message in Visual Studio 2005:
PInvokeStackImbalance was detected
Message: A call to PInvoke function
'Refresh!Refresh.Main::WNetAddConnection2' has unbalanced the stack.
...
|
by: linuxfedora |
last post by:
I wrote a class for playing wav file, the code:
class SoundPlayer
{
// flag values for SoundFlags argument on PlaySound
public int SND_SYNC = 0x0000; // play synchronously
(default)
public...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |