i have created an windows application, i have one textbox in form1. if i run the application it works fine ,
i have set in textbox_lostfocus
event-
Private Sub txtCardID_LostFocus(ByVal sender As Object, ByVal e As System.EventArgs) Handles txtCardID.LostFocus
txtCardID.Focus()
End Sub
And in form deactivate event -
Private Sub frmPlay_Deactivate(sender As Object, e As EventArgs) Handles MyBase.Deactivate
txtCardID_LostFocus(sender, e)
Me.Activate()
End Sub
but my problem is when i click other application say-paint,or something else that becomes activate and my application loss focus
when i click my form it activate and works
i need always my form to be activated and what ever key clicked the value should enter in textbox