Author |
Message |
J.J. Cauch #1 / 14
|
 Move the mouse!
Is there any method to move the position of the mouse for VB?
|
Mon, 03 Jun 2002 03:00:00 GMT |
|
 |
Peter Quic #2 / 14
|
 Move the mouse!
Hi J.J., API function SetCursorPos: Public Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long Pete
www.compuguide.be/vbasic/
Quote: > Is there any method to move the position of the mouse for VB?
|
Mon, 03 Jun 2002 03:00:00 GMT |
|
 |
Neil Gregor #3 / 14
|
 Move the mouse!
Try something like, Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long SetCursorPos Scalewidth/2,scaleheight/2 Neil Gregory * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
|
Mon, 03 Jun 2002 03:00:00 GMT |
|
 |
J.J. Cauc #4 / 14
|
 Move the mouse!
Is there any method to move the position of the mouse for VB?
|
Mon, 03 Jun 2002 03:00:00 GMT |
|
 |
Peter Qui #5 / 14
|
 Move the mouse!
Hi J.J., API function SetCursorPos: Public Declare Function SetCursorPos Lib "user32" (ByVal X As Long, ByVal Y As Long) As Long Pete
www.compuguide.be/vbasic/
Quote: > Is there any method to move the position of the mouse for VB?
|
Mon, 03 Jun 2002 03:00:00 GMT |
|
 |
Neil Grego #6 / 14
|
 Move the mouse!
Try something like, Public Declare Function SetCursorPos Lib "user32" (ByVal x As Long, ByVal y As Long) As Long SetCursorPos Scalewidth/2,scaleheight/2 Neil Gregory * Sent from AltaVista http://www.altavista.com Where you can also find related Web Pages, Images, Audios, Videos, News, and Shopping. Smart is Beautiful
|
Mon, 03 Jun 2002 03:00:00 GMT |
|
 |
J.J. Cauch #7 / 14
|
 Move the mouse!
So, how to generate a 'Click' event? Quote: > Is there any method to move the position of the mouse for VB?
|
Tue, 04 Jun 2002 03:00:00 GMT |
|
 |
J.J. Cauc #8 / 14
|
 Move the mouse!
So, how to generate a 'Click' event? Quote: > Is there any method to move the position of the mouse for VB?
|
Tue, 04 Jun 2002 03:00:00 GMT |
|
 |
Robert Bowmake #9 / 14
|
 Move the mouse!
Simply, in your code, put: Call Command1_Click() or just: Command1_Click() and that will run the sub. Quote: > So, how to generate a 'Click' event? > > Is there any method to move the position of the mouse for VB?
|
Wed, 05 Jun 2002 03:00:00 GMT |
|
 |
J.J. Cauch #10 / 14
|
 Move the mouse!
But I have to click objects outside the application, e.g. Start menu botton. Command1_Click() method dosen't support.
Simply, in your code, put: Call Command1_Click() or just: Command1_Click() and that will run the sub. So, how to generate a 'Click' event? > > Is there any method to move the position of the mouse for VB? > > >
|
Wed, 05 Jun 2002 03:00:00 GMT |
|
 |
Rowan Mille #11 / 14
|
 Move the mouse!
This code should help a bit. Just whack it in a form, press the up key and see what happens. Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Const MOUSEEVENTF_LEFTDOWN = &H2 Private Const MOUSEEVENTF_LEFTUP = &H4 Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyUp Then mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 3, 3 mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 3, 3 End If End Sub Quote:
> But I have to click objects outside the application, e.g. Start menu > botton.Command1_Click() method dosen't support.
> code, put: > Call Command1_Click() > or just: > Command1_Click() > and that will run the sub. > > So, how to generate a 'Click' event? > > > Is there any method to move the position of the mouse > > for VB?
|
Wed, 05 Jun 2002 03:00:00 GMT |
|
 |
Robert Bowmak #12 / 14
|
 Move the mouse!
--------------E2DBB5980DACC418C81CE5EA Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Simply, in your code, put: Call Command1_Click() or just: Command1_Click() and that will run the sub. Quote: > So, how to generate a 'Click' event? > > Is there any method to move the position of the mouse for VB?
--------------E2DBB5980DACC418C81CE5EA Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <i>Simply, in your code, put:</i> <p>Call Command1_Click() <p><i>or just:</i> <p>Command1_Click() <p><i>and that will run the sub.</i> <blockquote TYPE=CITE>So, how to generate a 'Click' event? <p>> <br>> Is there any method to move the position of the mouse for VB? <br>> <br>> <br>></blockquote> </html> --------------E2DBB5980DACC418C81CE5EA--
|
Wed, 05 Jun 2002 03:00:00 GMT |
|
 |
Rowan Mill #13 / 14
|
 Move the mouse!
--------------2CA525C0A8AF6EF587FC5B36 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit This code should help a bit. Just whack it in a form, press the up key and see what happens. Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long) Private Const MOUSEEVENTF_LEFTDOWN = &H2 Private Const MOUSEEVENTF_LEFTUP = &H4 Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer) If KeyCode = vbKeyUp Then mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 3, 3 mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 3, 3 End If End Sub Quote:
> But I have to click objects outside the application, e.g. Start menu > botton.Command1_Click() method dosen't support.
> code, put: > Call Command1_Click() > or just: > Command1_Click() > and that will run the sub. > > So, how to generate a 'Click' event? > > > Is there any method to move the position of the mouse > > for VB?
--------------2CA525C0A8AF6EF587FC5B36 Content-Type: text/html; charset=us-ascii Content-Transfer-Encoding: 7bit <!doctype html public "-//w3c//dtd html 4.0 transitional//en"> <html> <body bgcolor="#FFFFFF"> This code should help a bit. Just whack it in a form, press the up key and see what happens. <p><font color="#3333FF">Private Declare Sub mouse_event Lib "user32" (ByVal dwFlags As Long, ByVal dx As Long, ByVal dy As Long, ByVal cButtons As Long, ByVal dwExtraInfo As Long)</font> <br><font color="#3333FF">Private Const MOUSEEVENTF_LEFTDOWN = &H2</font> <br><font color="#3333FF">Private Const MOUSEEVENTF_LEFTUP = &H4</font><font color="#3333FF"></font> <p><font color="#3333FF">Private Sub Form_KeyDown(KeyCode As Integer, Shift As Integer)</font> <br><font color="#3333FF">If KeyCode = vbKeyUp Then</font> <br><font color="#3333FF"> mouse_event MOUSEEVENTF_LEFTDOWN, 0, 0, 3, 3</font> <br><font color="#3333FF"> mouse_event MOUSEEVENTF_LEFTUP, 0, 0, 3, 3</font> <br><font color="#3333FF">End If</font> <br><font color="#3333FF">End Sub</font>
<blockquote TYPE=CITE><style></style> <font size=-1>But I have to click objects outside the application, e.g. Start menu botton.</font><font size=-1>Command1_Click() method dosen't support.</font> <blockquote style="BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px">Robert Bowmaker <<a
in your code, put:</i> <p>Call Command1_Click() <p><i>or just:</i> <p>Command1_Click() <p><i>and that will run the sub.</i> <blockquote TYPE="CITE">So, how to generate a 'Click' event? <p>> <br>> Is there any method to move the position of the mouse for VB? <br>> <br>> <br>></blockquote> </blockquote> </blockquote> </body> </html> --------------2CA525C0A8AF6EF587FC5B36--
|
Wed, 05 Jun 2002 03:00:00 GMT |
|
 |
J.J. Cauc #14 / 14
|
 Move the mouse!
This is a multi-part message in MIME format. ------=_NextPart_000_0011_01BF4965.2EDEC860 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable But I have to click objects outside the application, e.g. Start menu = botton. Command1_Click() method dosen't support.
Simply, in your code, put:=20 Call Command1_Click()=20 or just:=20 Command1_Click()=20 and that will run the sub.=20 So, how to generate a 'Click' event?=20 >=20 > Is there any method to move the position of the mouse for VB?=20 >=20 >=20 > ------=_NextPart_000_0011_01BF4965.2EDEC860 Content-Type: text/html; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META content=3D"text/html; charset=3Diso-8859-1" = http-equiv=3DContent-Type> <META content=3D"MSHTML 5.00.2314.1000" name=3DGENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=3D#ffffff> <DIV><FONT size=3D2>But I have to click objects outside the application, = e.g.=20 Start menu botton.</FONT></DIV> <DIV><FONT size=3D2>Command1_Click() method dosen't = support.</FONT></DIV> <BLOCKQUOTE=20 style=3D"BORDER-LEFT: #000000 2px solid; MARGIN-LEFT: 5px; MARGIN-RIGHT: = 0px; PADDING-LEFT: 5px; PADDING-RIGHT: 0px"> <DIV>Robert Bowmaker <<A=20 =
>=20
=
.nz</A>...</DIV><I>Simply,=20 in your code, put:</I>=20 <P>Call Command1_Click()=20 <P><I>or just:</I>=20 <P>Command1_Click()=20 <P><I>and that will run the sub.</I>=20 <BLOCKQUOTE TYPE=3D"CITE">So, how to generate a 'Click' event?=20 <P>> <BR>> Is there any method to move the position of the = mouse for=20 VB? <BR>> <BR>> = <BR>></P></BLOCKQUOTE></BLOCKQUOTE></BODY></HTML> ------=_NextPart_000_0011_01BF4965.2EDEC860--
|
Wed, 05 Jun 2002 03:00:00 GMT |
|
|
|