谁会靠边隐藏
就像qq一样,靠边隐藏,哪位大神知道怎么弄
Private Type POINTAPI
x As Long
y As Long
End Type
Private Declare Function GetCursorPos Lib "user32" (lpPoint As POINTAPI) As Long
Dim pt As POINTAPI
Private Sub Form_Load()
Form1.Left = 10: Form1.Top = 10
End Sub
Private Sub Timer1_Timer()
GetCursorPos pt
Label1.Caption = Str(pt.x) + "/" + Str(pt.y)
If pt.x > Form1.Left + Form1.ScaleWidth Or pt.y > Form1.Top + Form1.ScaleHeight Then
Form1.Hide
Else
If pt.x < 10 Or pt.y < Form1.Height Then
Form1.Show
End If
End If
End Sub