TextBox Control in Visual Basic6.0


TextBox control is used to accept some data from the user. A text box’s purpose is to allow the user to input text information to be used by the program. User can type in the textbox that value can be accessed in any procedure by referring to the text property of the text box control.A typical text box is a rectangle of any size Text boxes usually display a text cursor. TextBox controls, which have a great many properties and events, are also among the most complex intrinsic controls.

 

.Open Visual Basic 6.0 and create a new Standard EXE Project.

2.From Standard EXE project Dialogbox choose Standard EXE form.

3.Add two TextBox from toolbox on the form.

4. Add one  Command Button  from toolbox on the form.

5.Change the caption of Command Button from Properties Window

6.When you design the form it is look like below

 

 

 

 

 

 

 

7 Then open the code window and write code :

 

 

 

 

9.Use the File menu to save your work as Main.frm and (your intitials)Project1.vbp

8.After coding press <F5> function key to run the application.

9.Enter  the digit in TextBox1 and press Command Button.

Comments are closed.