OCX interface tips
3 tips that you should definitely use to make your own developed ActiveX controls more developer friendly:
AI
Yapay Zeka Özeti: This codebase represents a historical implementation of the logic described in the metadata. Our preservation engine analyzes the structure to provide context for modern developers.
Kaynak Kod
<P><B>(1) Use enumerated types wherever you can in your control's interface</P> - When you create a property for your control, try to define it as an enumerated type wherever possible. Doing so allows the Visual Basic IDE to populate a listbox with the values and their description in the "properties" tab. Thus where the ImageMap control has a ControlMode property which says how the control is behaving, the property is implemented as an enumerated type: </P> <P> <PRE> Private Enum enControlMode cm_Runtime = 1 '\\ The control is in runtime mode cm_DesignTime_Selecting '\\ Control is design time but no ImageMapItem is selected cm_DesignTime_Selected '\\ Control is in design time and an ImageMapItem is selected cm_DesignTime_Drawing '\\ Control is drawing a new ImageMapItem End Enum </PRE> </P> <P> This gives the developer more information about what the property is all about. </P> <P><B>(2) Use the "Procedure Attributes" screen to give extra information about your properties.</B> Bringing up the procedure attributes screen to set extra information about your properties. In particular, pressing the "Advanced >>>" button brings up three drop down boxes - Procedure ID:, Use this page in property browser:, and Property Category:.</P> <P><B>(3) Fill the "Description" box of the "Procedure Attributes" box with a short but informative description.</B> This information is displayed when that property is the currently selected one in the property browser widnow. </P>
Orijinal Yorumlar (3)
Wayback Machine'den kurtarıldı