展开全部
'添加Timer控件Timer1,设置Interval属性,最好在100至500之间
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Timer1_Timer()
Dim p As POINTAPI
GetCursorPos p
Me.Visible = p.x * 15 >= Me.Left And p.x * 15 < Me.Left + Me.Width _
And p.y * 15 >= Me.Top And p.y * 15 < Me.Top + Me.Height
End Sub
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Private Type POINTAPI
x As Long
y As Long
End Type
Private Sub Timer1_Timer()
Dim p As POINTAPI
GetCursorPos p
Me.Visible = p.x * 15 >= Me.Left And p.x * 15 < Me.Left + Me.Width _
And p.y * 15 >= Me.Top And p.y * 15 < Me.Top + Me.Height
End Sub
已赞过
已踩过<
评论
收起
你对这个回答的评价是?
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询