Current location - Plastic Surgery and Aesthetics Network - Plastic surgery and beauty - What is the code to change the font size of text box control in VB?
What is the code to change the font size of text box control in VB?
The code to change the font size of the text box control in VB is:

Private subcommand 1_Click ()

Text 1。 Set the font.

Text 1。 Set the font size.

Text 1。 FontBold = True' set bold.

Text 1。 FontItalic = True' Set the inclination.

Text 1。 "set underline".

End joint

Extended data:

text attribute

Through text attributes, human-computer interaction can be realized. When the program is running, characters are input into the Text box from the keyboard, and the contents of the characters are obtained through the text property of the text box, and then these contents can be assigned to variables, thus realizing the input operation. You can also assign the value of a variable to a text box, thus realizing the output of data.

Change event

When the user inputs new content, or the Text attribute is redistributed in the program, that is, as long as the Text attribute changes, the event can be triggered. Note that this event is triggered every time a character is entered.

Setfocus method

This method moves the cursor to the specified text box. When multiple text boxes are established on a form, you can use this method to place the cursor on the required text boxes.

keybd_event

This event can be triggered when the keyboard types characters into text. KeyAscii in the event parameter can get the Ascii value of the typed key, and the user can get the button pressed by the user.

Baidu encyclopedia -vb text box