Potresti mettere due variabili booleane globali che setti a true quando ognuno dei due controlli perde il focus. Es.
codice:
Dim TextboxFocusPerso as boolean = False
Dim ListboxFocusPerso as boolan = False
Private Sub Textbox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Textbox1.GotFocus
TextboxFocusPerso =false
End Sub
Private Sub Textbox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Textbox1.GotFocus
TextboxFocusPerso =True
If TextboxFocusPerso =True And ListboxFocusPerso =True Then
Listbox1.visible = false
End if
End Sub
Private Sub Listbox1_GotFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Listbox1.GotFocus
ListboxFocusPerso =false
End Sub
Private Sub Listbox1_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles Textbox1.GotFocus
ListboxFocusPerso =True
If TextboxFocusPerso =True And ListboxFocusPerso =True Then
Listbox1.visible = false
End if
End Sub
Penso di non avere dimenticato nulla...