人民警察警衔会修改吗?:C#代码问题

来源:百度文库 编辑:杭州交通信息网 时间:2024/04/29 00:19:27
[DllImport("user32.dll")]
static extern void mouse_event(long dwFlags,long dx,long dy ,long dwData ,long dwExtralnfo);
const long MOUSEEVENTF_MOVE=0x1;
const long MOUSEEVENTF_LEFTDOWN=0x2;
const long MOUSEEVENTF_LEFTUP=0x4;
const long MOUSEEVENTF_RIGHTDOW=0x8;
const long MOUSEEVENTF_RIGHTUP=0x10;
const long MOUSEEVENTF_MIDDLEDOWN=0x20;
const long MOUSEEVENTF_MIDDLEUP=0x40;
const long MOUSEEVENTF_ABSOLUTE=0x8000;
public static void lj1()
{
mouse_event(MOUSEEVENTF_MOVE,10,10,0,0);
}
这段代码执行后鼠标只上下移动而且是相对移动怎摸样才可以实现绝对坐标移动还有哪个把屏幕分为65535x65535的哪个怎摸用紧急求助

第一个参数dwFlags可以设为MOUSEEVENTF_ABSOLUTE

MSDN中的说明如下:
MOUSEEVENTF_ABSOLUTE Specifies that the dx and dy parameters contain normalized absolute coordinates. If not set, those parameters contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected to the system. For further information about relative mouse motion, see the following Remarks section.

中文解释如下:
dx和dy指定鼠标坐标系统中的一个绝对位置。在鼠标坐标系统中,屏幕在水平和垂直方向上均匀分割成65535×65535个单元

请参考

第一个参数dwFlags可以设为MOUSEEVENTF_ABSOLUTE

MSDN中的说明如下:
MOUSEEVENTF_ABSOLUTE Specifies that the dx and dy parameters contain normalized absolute coordinates. If not set, those parameters contain relative data: the change in position since the last reported position. This flag can be set, or not set, regardless of what kind of mouse or mouse-like device, if any, is connected to the system. For further information about relative mouse motion, see the following Remarks section.

中文解释如下:
dx和dy指定鼠标坐标系统中的一个绝对位置。在鼠标坐标系统中,屏幕在水平和垂直方向上均匀分割成65535×65535个单元