Re: Moving Mouse
- From: "<ctacke/>" <ctacke[@]opennetcf[dot]com>
- Date: Thu, 11 Jan 2007 16:16:12 -0500
And had you posted all of the original code, we could have told you that.
--
Chris Tacke
OpenNETCF Consulting
Managed Code in the Embedded World
www.opennetcf.com
--
"Wagner Bertolini Junior" <wagnerbertolini@xxxxxxxxxxxxxxxxxx> wrote in
message news:uYB$mwbNHHA.4928@xxxxxxxxxxxxxxxxxxxxxxx
Answer to THIS and ANOTHER post (Moving Mouse)
Ohhh god!!
high level mind problem!!!
I found the problem!
I just declared the p/invoke like that:
[DllImport("coredll.dll")]
public static extern void mouse_event(long flags, long x, long y, long
data,
long extraInfo);
it works, but the first parameter is a flag!!! Of course, we need to
do BITWISE compare to choice!
THE DECLARATION IS WRONG!!
CORRECT:
[DllImport("coredll.dll")]
public static extern void mouse_event(int flags, int x, int y, int data,
int
extraInfo);
Or BETTER :
[DllImport("coredll.dll")]
public static extern void mouse_event(MOUSEEVENTF flags, int x, int y, int
data, int extraInfo);
public enum MOUSEEVENTF
{
MOVE = 0x1, /* mouse move */
LEFTDOWN = 0x2, /* left button down */
LEFTUP = 0x4, /*left button up */
RIGHTDOWN = 0x8, /*right button down */
RIGHTUP = 0x10, /*right button up */
MIDDLEDOWN = 0x20, /*middle button down */
MIDDLEUP = 0x40, /* middle button up */
WHEEL = 0x800, /*wheel button rolled */
VIRTUALDESK = 0x4000, /* map to entrire virtual desktop */
ABSOLUTE = 0x8000, /* absolute move */
TOUCH = 0x100000, /* absolute move */
}
Thanks to all!!
"Wagner Bertolini Junior" <wagnerbertolini@xxxxxxxxxxxxxxxxxx> escreveu na
mensagem news:69D5C97F-7467-4854-9346-5090A5877A82@xxxxxxxxxxxxxxxx
Can anyone help on this?
i´m not agreeing with documentation about mouse moves and screen. at the
documentation of windows CE they talk about an absolute range 0 to 65535.
But
when i try to send a click in certainly coordinates it does on the Axis-X
=
0, at the extreme left, always. If i send (32000, 32000) the click
appears to
be done on
(0, 32000). i cant´understand it.
I´m working with windows ce 5.0.
.
- Follow-Ups:
- Re: Moving Mouse
- From: Wagner Bertolini Junior
- Re: Moving Mouse
- References:
- Re: Moving Mouse
- From: Wagner Bertolini Junior
- Re: Moving Mouse
- Prev by Date: Re: Constant Value Where to find?
- Next by Date: Re: How to stop beep when enter is pressed on a text box?
- Previous by thread: Re: Moving Mouse
- Next by thread: Re: Moving Mouse
- Index(es):
Relevant Pages
|