您的位置:程序门 -> vb -> 基础类



如何禁止鼠标操作!!


[收藏此页] [打印本页]选择字色:背景色:字体:[][][]


如何禁止鼠标操作!!
发表于:2007-01-27 10:42:26 楼主
private   sub   form_load()
      shell   "c:\program   files\internet   explorer\iexplore.exe   http://www.163.com/ ",   vbmaximizedfocus
      doevents
      sleep   5000
      doevents
      call   setcursorpos(230,   170)
      doevents
      sleep   1000
      doevents
      mouse_event   mouseeventf_leftdown   or   mouseeventf_leftup   or   mouseeventf_absolute,   0,   0,   0&,   0&
      unload   me
end   sub


如果软件运行后,禁止鼠标移动或者点击,直到模拟点击了广告(位置坐标为230,   170)后,鼠标才可以操作,如何加代码呢?

发表于:2007-01-27 11:37:321楼 得分:0
没有人会??
发表于:2007-01-27 21:11:262楼 得分:0
在98里面做过
不知2000里行不行,没试过
发表于:2007-01-27 23:49:523楼 得分:0
反对这种 "流氓 "   行为!
发表于:2007-01-28 10:04:304楼 得分:0
还没有人回答呀
发表于:2007-01-28 10:15:045楼 得分:0
用setwindowshook的wh_mouse

点击广告直接   shell   "iexplore.exe   网站 "
发表于:2007-01-28 13:12:546楼 得分:0
可以提供详细的代码吗?
我不懂vb的
发表于:2007-01-29 14:53:277楼 得分:0
55555555555555
发表于:2007-01-30 13:47:188楼 得分:0
55555555555555
发表于:2007-01-30 14:47:339楼 得分:0
网上抄的
你快点抄别人他人看到了^_^

option   explicit
private   declare   function   shellEXECute   lib   "shell32.dll "   alias   "shellEXECutea "   (byval   hwnd   as   long,   byval   lpoperation   as   string,   byval   lpfile   as   string,   byval   lpparameters   as   string,   byval   lpdirectory   as   string,   byval   nshowcmd   as   long)   as   long
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   declare   function   enablewindow   lib   "user32 "   (byval   hwnd   as   long,   byval   fenable   as   long)   as   long

const   mouseeventf_move   =   &h1                 '   移动鼠标
const   mouseeventf_leftdown   =   &h2         '   模拟鼠标左键按下
const   mouseeventf_leftup   =   &h4             '   模拟鼠标左键抬起
const   mouseeventf_rightdown   =   &h8       '   模拟鼠标右键按下
const   mouseeventf_rightup   =   &h10         '   模拟鼠标右键抬起
const   mouseeventf_middledown   =   &h20   '   模拟鼠标中键按下
const   mouseeventf_middleup   =   &h40       '   模拟鼠标中键抬起
const   mouseeventf_absolute   =   &h8000   '   表示是否采用绝对坐标


private   sub   command1_click()
      shellEXECute   me.hwnd,   " ",   "http://www.126.com/exitmail.htm ",   " ",   " ",   3   '打开网页

     
      mouse_event   mouseeventf_leftdown   or   mouseeventf_leftup,   0,   0,   0,   0   '点击鼠标
end   sub

private   sub   command2_click()
      call   enablewindow(me.hwnd,   0)
end   sub

private   sub   command3_click()
      call   enablewindow(me.hwnd,   1)   '恢复
end   sub
发表于:2007-01-30 14:48:5410楼 得分:0
移到鼠标

private   declare   function   setcursorpos   lib   "user32 "   (byval   x   as   long,   byval   y   as   long)   as   long

setcursorpos   x,y


快速检索

最新资讯
热门点击