OnEnter is a Protected method which means that it is available to be called within the class and inherited classes. If you try and call the method within a WinForm, a warning will appear and the project won't compile. The OnEnter method is used to handle the Enter event in derived classes without needing to attach a delegate.
>I'm now doing that, binding to the enter method and setting enabled false if conditions aren't met. In the leave method I'm setting enabled true, so I don't have to do anything to manage the enabled state of the control when navigating thru the dataset. This bounces the user to the next enabled control. Seems to work fine.
>
>Thanks for your help and also Christopher's.
>
>I looked at using the ONENTER method, but couldn't find that in the declarations for the control. When I typed it in, I got the error "Event 'ONENTER' cannot be found".
>
>For my future info, how is that method accessed? Is it used in subclassing only?
-----------------------------------------
Cathi Gero, CPA
Prenia Software & Consulting Services
Microsoft C# / .NET MVP
Mere Mortals for .NET MVP
cgero@prenia.comwww.prenia.comWeblog: blogs.prenia.com/cathi