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

ID Number: Q82155

1.00

WINDOWS

Summary:

The Graph version 1.2 custom control in Microsoft Professional Toolkit

for Visual Basic 1.0 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.

This information applies to the Graph version 1.2 custom control

provided with Microsoft Professional Toolkit for Visual Basic version

1.0 for Windows.

More Information:

The example below demonstrates that ThisPoint and ThisSet are reset to

1 at run time.

Example

-------

1. With Visual Basic 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 F5 to run the program.

When you run the program and click on 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 reference words: 1.00