I am setting focus to combobox as combobox.select() in a thread by using the delegate. But only after changing the ALT+TAB to another window the combobox is getting focused.
How to solve this problem...
Please help me...
Thanks in advance...
The code is here...
=============
Private Delegate Sub cmbusersetfocus()
Private Sub combouser()
If Me.InvokeRequired Then
' if operating on a thread, invoke a delegate
' on the UI thread.
Dim omd As cmbusersetfocus = New cmbusersetfocus(AddressOf combouser)
Dim arx As IAsyncResult = Me.BeginInvoke(omd)
Me.EndInvoke(arx)
If cmbuser.Focus = False Then
cmbuser.Select()
End If
'cmbuser.Focus()
'Form1.Activate()
' End If
'MsgBox("test")
Return
End If
End Sub