Tuesday, December 11, 2007

How to access properties of your Textbox control

How to access properties of your Textbox control

Step 1

To access properties of your control, it is essential to know the name of your object. In example we will set your textbox TEXT properties to TextBox Created when your window form load.

Step 2

Double click on your Form and then under the Form1_Load(), key in the name of your textbox control which is TextBox1 and then follow by a DOT. Then all it’s methods/ attributes will appear as shown in the diagram below.

Step 3

To set your textbox properties to Text.

Textbox1.TEXT = "TextBox Created"

Step 4

Press F5 to run your textbox. An example of the application that we have created is shown below:

No comments: