十年网站开发经验 + 多家企业客户 + 靠谱的建站团队
量身定制 + 运营维护+专业推广+无忧售后,网站问题一站解决
调用api
官渡网站制作公司哪家好,找成都创新互联!从网页设计、网站建设、微信开发、APP开发、响应式网站开发等网站项目制作,到程序开发,运营维护。成都创新互联成立于2013年到现在10年的时间,我们拥有了丰富的建站经验和运维经验,来保证我们的工作的顺利进行。专注于网站建设就选成都创新互联。
在Visual Baisc.net中的声明:
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)
Public Const MOUSEEVENTF_LEFTDOWN = H2 '模拟鼠标左键按下
Public Const MOUSEEVENTF_LEFTUP = H4 ’模拟鼠标左键释放
Public Const MOUSEEVENTF_MIDDLEDOWN = H20 '模拟鼠标中间键按下
Public Const MOUSEEVENTF_MIDDLEUP = H40 '模拟鼠标中间键释放
Public Const MOUSEEVENTF_RIGHTDOWN = H8 '模拟鼠标右键按下
Public Const MOUSEEVENTF_RIGHTUP = H10 '模拟鼠标右键释放
Public Const MOUSEEVENTF_MOVE = H1 '模拟鼠标指针移动
例:
mouse_event MOUSEEVENTF_LEFTDOWN,10,10,0,0
'在(10,10)模拟鼠标左键按下
控件是可以显示在里面的,你只要加个label,把label的属性设为visualble=fause就行。设置鼠标经过头像的mouseHover和mouseLeave事件,当mouseHover时label的属性visualble=true,当mouseLeave时label的属性visualble=fause即可。窗体的鼠标事件可以设置控件的cursor属性,里面可以选择许多种鼠标图形。 只要是正常的Form都可以改变窗体大小,但是无边框的窗体只能用函数改变或者设置属性,在debug后是不能改变的。拖动窗体需要在窗体的load时间里面写入当鼠标单击不放时的事件即可,不难。
Imports System.Runtime.InteropServices
DllImport("user32.dll")
Private Shared Function SetCursorPos(ByVal X As Integer, ByVal Y As Integer) As Boolean End Function
DllImport("user32.dll")
Private Shared Sub mouse_event(ByVal flags As MouseEventFlag, ByVal dx As Integer, ByVal dy As Integer, ByVal data As UInteger, ByVal extraInfo As UIntPtr) End Sub
Flags()
Private Enum MouseEventFlag As UInteger
Move = H1
LeftDown = H2
LeftUp = H4
RightDown = H8
RightUp = H10
MiddleDown = H20
MiddleUp = H40
XDown = H80
XUp = H100
Wheel = H800
VirtualDesk = H4000
Absolute = H8000
End Enum
SetCursorPos(intX, intY)mouse_event(MouseEventFlag.LeftDown, intX, intY, 0, UIntPtr.Zero)
mouse_event(MouseEventFlag.LeftUp, intX, intY, 0, UIntPtr.Zero)