| 发表于: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 | | |
|