Note: You must be registered in order to post a reply. To register, click here. Registration is FREE!
T O P I C R E V I E W
quinncurtis
Posted - 03 May 2011 : 14:33:02 This topic applies to VB programmers using VS 2005 or 2008 Starting with Visual Basic in VS 2005, (but not C#), when you use the project option to Add User Control to a project, where you intend to change the Inherit UserControl line to Inherit ChartView, you end up with TWO new VB files, instead of just one. The first is UserControl1.vb file, as described in our Tutorial documentation. You must change the Inherit UserControl line to Inherit ChartView. You must ALSO change the same line in the second file, UserControl.Designer.vb. For some perverse reason this file is HIDDEN by default. You must explicitly select the Show All Files option of the Solution Explorer (second button from the left at the top of the Solution Explorer). Now you will see the UserControl.Designer.vb file under the UserControl.vb file in the Solution Explorer. Select the UserControl.Designer.vb file and edit the code so that the Inherit line matches the Inherit line of the UserControl1.vb. You MUST also add an Imports statement at the top of the file, referencing the quinn-curtis library(s) you are using, this would be the same Imports statement found in UserControl1.vb.
Once you get this to compile, display the UserControl.vb file in design mode, and double click on the empty image of the control. This will add a UserControl1_Load event to the UserControl.vb that you can use to invoke the graph building method of your program, InitializeChart in most of our examples.