dcsimg
November 28, 2020
Hot Topics:

Make a Light Chart Control

  • By Sam Huggill
  • Send Email »
  • More Articles »

Well, where do we begin? Properties would be a good start. VB makes adding properties to a usercontrol easy by providing us with the ActiveX Control Interface Wizard. To load this, click Project, Add User Control and select VB ActiveX Control Interface Wizard. Follow the steps through and add the following properties:

Backcolor OLE_COLOR (Get and Let)
DisplayLegend BOOLEAN (Get and Let)
Enabled BOOLEAN (Get and Let)
Font FONT (Get and Let)
ForeColor OLE_COLOR (Get and Let)
HighScale DOUBLE (Get and Let)
HorizontalTickFrequency VARIANT (Get and Let)
LowScale DOUBLE (Get and Let)
PlotPoints BOOLEAN (Get and Let)
Title STRING (Get and Let)
TitleFont FONT (Get and Let)
VerticalTickInterval VARIANT (Get and Let)

You will also need to manually add the following Get and Let procedures:

ChartType CHARTTYPES

If you arent sure what these procedures look like, here is the one for the ChartType property:

Public Property Get ChartType() As ChartTypes'Property Code HereEnd PropertyPublic Property Let ChartType(ByVal New_ChartType As ChartTypes)'Property Code HereEnd Property

(NOTE: Dont worry about the Property Code here comments, as you will learn later what you need to place in there.)





Page 3 of 7



This article was originally published on November 20, 2002

Enterprise Development Update

Don't miss an article. Subscribe to our newsletter below.


Thanks for your registration, follow us on our social networks to keep up-to-date