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

ID Number: Q84058

1.00

WINDOWS

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.

This information applies to the Graph custom control supplied with

Microsoft Professional Toolkit for Microsoft Visual Basic programming

system for Windows version 1.0.

More Information:

In Visual Basic, 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 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, or from the File menu, choose New Project (ALT,

F, N) if Visual Basic 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 reference words: 1.00