We have a little bit of a niggling problem with a piece of software that we are developing.
The item that is giving us problems is a text box with tips in. When the box is first opened there is no cursor present, so when it is supposed to go out of focus it remains in focus. We have to click another item in the search window that the text box is linked to to get the box to disappear. Hope that is clear?
Here is the code:
Private Sub Form_Load ()
'Set lblttip to focus so that it hides when focus is lost
lblttip.SelStart = 0: lblttip.SelLength = 1
'Redefine background colour
Me.BackColor = RGB (238, 238, 238)
'Call always on top
Call SetWindoePos(Me.hwnd, HWND_TOPMOST, 0,0,0,0, SWP_NOMOVE Or SWP_NOSIZE)
Private Sub lblttip_LostFocus () 'Hide form and kill speech when focus is lost Me.Hide frmmain.dssl.Speak ""