A class never has an address. A class cannot be displayed.
To use a class at runtime, it must be instantiated. By this an object is created. This is either done by the framework at start, or by the program with the New command.
In both cases some memory holds all the variables of the class.
Objects have a runtime address. This address can be displayed in the watch window. As well members of the object can be displayed in the watch window.
Expression | Value |
---|---|
TextBox | ERROR: Unknown ... |
TextBox1 | (TextBox 0x81099c0) |
xTextBox1 | (TextBox 0x81099c0) |
xTextBox1.Text | "Set xTextBox1" |
PUBLIC SUB Button1_Click() DIM xTextBox1 AS TextBox ' can hole the address of the object xTextBox1 = TextBox1 ' gets the address of the already existing object xTextBox1.Text = "Set xTextBox1" xTextBox1.X = TextBox1.X + 80 xTextBox1.Y = TextBox1.Y + 120 END
PUBLIC SUB Button1_Click() DIM xTextBox1 AS TextBox ' can hold the address of the object xTextBox1 = NEW TextBox(Form1) ' Instatiate a TextBox, create the object xTextBox1.Text = "Set xTextBox1" xTextBox1.X = TextBox1.X + 80 xTextBox1.Y = TextBox1.Y + 120 END