Visual Basic (Declaration) | |
---|---|
Protected Overridable Sub OnUserState( _ ByVal e As UserStateEventArgs _ ) |
Visual Basic (Usage) | ![]() |
---|---|
Dim instance As ComponentBase Dim e As UserStateEventArgs instance.OnUserState(e) |
C# | |
---|---|
protected virtual void OnUserState( UserStateEventArgs e ) |
Managed Extensions for C++ | |
---|---|
protected: virtual void OnUserState( UserStateEventArgs* e ) |
C++/CLI | |
---|---|
protected: virtual void OnUserState( UserStateEventArgs^ e ) |
Parameters
- e
- A UserStateEventArgs object containing user state information.
Raising an event invokes the event handler through a delegate. The Synchronizing property must be set.
The OnUserState method also allows derived classes to handle the event without attaching a delegate. This is the preferred technique for handling the event in a derived class.
Note to Inheritors: When overriding OnUserState in a derived class, be sure to call the base class OnUserState method, so that registered delegates receive the event.
See the SynchronizingObject property for important information on updating UI controls from within derived classes and events.
Target Platforms: Microsoft .NET Framework 2.0