Toggled object Close on any action

I have an object that toggles when I click on another object it is set to close on any action which is fine when I click on the desktop however if I click on an open window, taskbar, start button whatever else it remains open. Is there anyway to set it so that it closes on the very next mouse click no matter where it is either by script or setting change.
934 views 2 replies
Reply #1 Top
I would suggest playing around with the Object.KillFocus property...
Reply #2 Top
Or 2nd Suggestion... using OnMouseLeave sub have it set a timer that will wait for say 2 seconds after the mouse has moved off the object and then hide it... Code would be similar to....

Sub Object_OnMouseLeave
Object.SetTimer 1, 2000 '2 Seconds
End Sub

Sub Object_OnTimer1
Object.Visible = False
Object.KillTimer 1
End Sub