VB编写跟踪鼠标轨迹程序

VB编写跟踪鼠标轨迹程序,第1张

Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)

Form1.Circle (X, Y), 60

End Sub

[code:1]

#include <gdk/gdk.h>

main()

{

int x,y

GdkDisplay *dpy

GdkScreen *scr

GdkModifierType mask

gdk_init(NULL,NULL)

dpy = gdk_display_open(NULL)

if(dpy)

{

scr = gdk_display_get_screen(dpy,0)

gdk_display_get_pointer(dpy,&scr,&x,&y,&mask)

printf("x=%d y=%d\n",x,y)

}

gdk_exit(NULL)

}

[/code:1]

[code:1]

#include <stdio.h>

#include <X11/Xlib.h>

main()

{

Display *dpy

Window win

Window root

Window child

int rootx,rooty,winx,winy,mask

dpy=XOpenDisplay(NULL)

if(!dpy)

{

printf("XOpenDisplay error\n")

return

}

XQueryPointer(dpy, RootWindow(dpy,0), &root, &child,

&rootx, &rooty, &winx, &winy, &mask)

printf("x=%d y=%d\n", rootx, rooty)

XCloseDisplay(dpy)

}

[/code:1]


欢迎分享,转载请注明来源:内存溢出

原文地址: http://outofmemory.cn/yw/11045264.html

(0)
打赏 微信扫一扫 微信扫一扫 支付宝扫一扫 支付宝扫一扫
上一篇 2023-05-13
下一篇 2023-05-13

发表评论

登录后才能评论

评论列表(0条)

保存