Saturday, September 12, 2015

How to display text in Visual Basic 6

To display text on Form1, write:

Print "You text"
or:
Form1.Print "You text"

To display text on button Command1, write:

Command1.Caption="You text"

To display text on PictureBox Picture1, write:

Picture1.Print "You text"

To display text on TextBox Text1, write:

Text1.Text="You text"

To display text on the upper band with the name of Form1, write:

Form1.Caption="You text"

To display numeric variable in Command1, Text1 or Form1.Caption, write Str(variable).
Example:
a=67+65
Command1.Caption=Str(a)

No comments:

Post a Comment