Thank you
Printable View
Thank you
Try this:
Add a Timer Control to a Form..
private Type POINTAPI
x as Long
y as Long
End Type
private Declare Function GetCursorPos Lib "user32" (lpPoint as POINTAPI) as Long
private Sub Form_Activate()
Timer1.Enabled = true
End Sub
private Sub Form_Load()
Timer1.Interval = 100
End Sub
private Sub Timer1_Timer()
Dim tPA as POINTAPI
Call GetCursorPos(tPA)
If tPA.x < ScaleX(Left, vbTwips, vbPixels) Or tPA.x > ScaleX(Left + Width, vbTwips, vbPixels) Or tPA.y < ScaleY(Top, vbTwips, vbPixels) Or tPA.y > ScaleY(Top + Height, vbTwips, vbPixels) then
Timer1.Enabled = false
Hide
End If
End Sub
Aaron Young
Analyst Programmer
[email protected]
[email protected]