Philipp wrote:
Is there a way to know which control just lost focus when clicking on a
button?
I've used this in a custom Button class.
Class myButton
Inherits Button
Protected Overrides Sub OnClick(ByVal e As System.EventArgs)
If Not (Me.FindForm Is Nothing) _
AndAlso Not (Me.FindForm.ActiveControl Is Me) _
Then
Me.Focus()
End If
MyBase.OnClick()
End Sub
End Class
I haven't tried, but you /might/ be able to do the same sort of thing in
the event handler for an "ordinary" Button's Click event.
HTH,
Phill W.