Microsoft KB Archive/84058

= VB Graph Custom Control: DataReset Property Resets to 0 (Zero) =

Article ID: 84058

Article Last Modified on 2/23/2007

-

APPLIES TO


 * Microsoft Visual Basic 2.0 Professional Edition
 * Microsoft Visual Basic 3.0 Professional Edition
 * Microsoft Windows 2000 Readiness Analyzer

-



This article was previously published under Q84058



SUMMARY
When you assign a value to the DataReset property of the Graph version 1.2 custom control, the value of DataReset always resets to 0 - None. This is by design. Although DataReset is listed in the Properties box, it also has characteristics of a method. A value assigned to DataReset is transient, which means that it causes a one-time action and then resets to 0 - None.



MORE INFORMATION
In Visual Basic for Windows, a property is an attribute of the control that you can set to define one of the object's characteristics. DataReset is a property because you can set its value which, depending on that value, defines one or more of the Graph control's characteristics. Because it defines a Graph's characteristics by resetting the chosen property array to its default values, DataReset is found in the Properties list box.

A method in Visual Basic for Windows behaves similarly to a statement in that it always acts on an object. DataReset can also be considered a method because it does perform an action on the graph. Namely, it resets the chosen property array to its default values. DataReset performs the assigned action as soon as its value does not equal 0. If it retained its assigned value, it would continually generate an endless loop and lock the system. To prevent this from occurring, it is automatically reset to 0 - None upon the first execution of its call.

The example below demonstrates the behavior of DataReset.

Example

 * 1) Run Visual Basic for Windows, or from the File menu, choose New Project (press ALT, F, N) if Visual Basic for Windows is already running. Form1 is created by default.
 * 2) From the File menu, choose Add File. In the Files box, select the GRAPH.VBX custom control file. The Graph tool will appear in the Toolbox.
 * 3) Add a Graph control (Graph1) to Form1.
 * 4) In the Properties list box, select the DataReset property. The value that appears in the Settings box will be 0 - None.
 * 5) Change the value of DataReset to a number between 1 and 9. The values 1-9 refer to Graph property arrays that can be reset by using the DataReset property.
 * 6) Graph1 will update to display the default values in the property array you chose in step 5.
 * 7) In the Properties list box, select DataReset. The value of DataReset is 0 - None. It did not retain the value from step 5.

Additional query words: 1.00 2.00 3.00

Keywords: KB84058

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.