|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Lost focusHi NG,
Is there a way to know which control just lost focus when clicking on a button? (other than keeping an object variable which is set when a control loses focus)? Thanks in advance! Greets Philipp Philipp wrote:
> Is there a way to know which control just lost focus when clicking on a I've used this in a custom Button class.> button? 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.
How do you get to this newsgroup quickly, AND STAY HERE?
why is dataAdapter.UpdateCommand not updating? How can you convert an integer into a VB.NET color? Label problem How to call BeginInvoke for a sub that has a parameter ? Define an object??? Requesting advice: shared properties vs other class interactions. Use a System.Type in Generics? Newbie needs help with datagrid create csv file |
|||||||||||||||||||||||