UserControl Event 1% is not supported.
Using the VBUC, ActiveX controls can be migrated to .NETWindows Controls. This can present a problem when migrating certain ActiveX User Controls that implement Events that are no longer supported in .NET. In most cases, this is because they do not have an exact equivalent in .NET.
An understanding of both the source platform and the target platform is helpful in coming up with a viable solution. Some of this is described in MSDN's User Controls for Visual Basic 6.0 Users.
Visual Basic 6.0 Support
Resources for those unfamiliar with Visual Basic 6.0 ActiveX Controls:
- Creating an ActiveX Control - a basic tutorial from which the sample VB6 code was taken.
- UserControl properties - on UserControl's built-in properties.
- Life and Times of a UserControl Object - on the events and lifecycle of a UserControl.
- Understanding Control Lifetime and Key Events
- Extender Object - for an overview of the Extender object.
.Net Framework Support
This solution makes use of Application Settings to replace Visual Basic 6's PropertyBag. In most cases this is not necessary as .NET's design model maintains the state of properties without the use of the Settings object. This example assumes that these values need to be preserved between instances of the program.