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

Last reviewed: June 21, 1995
Article ID: Q82155
The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows,

  versions 2.0 and 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).

  • On Form1 create a graph control (Graph1).

  • Change the following properties:

    Control           Property          Value
    -------           --------          -----
    Command1          Caption           Show values
    Graph1            Top               2000
    Graph1            NumSet            2
    Graph1            ThisPoint         2
    Graph1            ThisSet           2
    
    

  • 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
    
    

  • 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 reference words: 1.00 2.00 3.00
    KBCategory: kbprg kbcode
    KBSubcategory: PrgCtrlsCus


    THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

    Last reviewed: June 21, 1995
    © 1998 Microsoft Corporation. All rights reserved. Terms of Use.