VB Graph Control: ThisPoint, ThisSet Reset to 1 at Run Time

ID: Q82155


The information in this article applies to:
  • Microsoft Visual Basic Professional Edition for Windows, versions 2.0, 3.0
  • Microsoft Professional Toolkit for Microsoft Visual Basic programming system for Windows, version 1.0


SUMMARY

The Graph version 1.2 custom control in the Professional Edition of Microsoft Visual Basic versions 2.0 or 3.0 for Windows, and in the Microsoft Professional Toolkit for Visual Basic version 1.0 for Windows, allows you to set the values of the ThisPoint and ThisSet properties at design time to aid in the development of your graphs. However, when you run the project, the Graph custom control resets the property values of ThisPoint and ThisSet to 1.

This behavior is a design feature of the Graph custom control to help avoid logic errors in your code. If your program requires ThisPoint and ThisSet to be a value other than 1 upon execution of the project, you will need to specifically set these property values in the program's code.


MORE INFORMATION

The example below demonstrates that ThisPoint and ThisSet are reset to 1 at run time.

Example

  1. With Visual Basic for Windows running and Graph loaded, create a form (Form1).


  2. On Form1 create a graph control (Graph1).


  3. Change the following properties:
    
    Control           Property          Value
    -------           --------          -----
    Command1          Caption           Show values
    Graph1            Top               2000
    Graph1            NumSet            2
    Graph1            ThisPoint         2
    Graph1            ThisSet           2 


  4. Add the following code to the Command1 button Click event:
    
    Sub Command1_Click ()
         Form1.Print "Graph1.ThisPoint = "; Graph1.ThisPoint
         Form1.Print "Graph1.ThisSet = "; Graph1.ThisSet
    End Sub 


  5. Press the F5 key to run the program.


When you run the program and click the Command1 button, the program will display the current values of Graph1.ThisPoint and Graph1.ThisSet. These values should have changed from 2 to 1.

Additional query words: 1.00 2.00 3.00

Keywords :
Version : WINDOWS:2.0,3.0; :1.0
Platform : WINDOWS
Issue type :


Last Reviewed: January 25, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.