Home > Software engineering >  VB simple item, the great god
VB simple item, the great god

Time:10-28

VB has a command, a text, two label, how to do it in the text input number, click the command, label12 in words and figures out the corresponding change

CodePudding user response:

Write well, code is as follows:
 
Option Explicit

Private Sub Command1_Click ()
Label1. Caption=Text1. Text
Label2. Caption=Text1. Text
End Sub

Download address:
Link: https://pan.baidu.com/s/1HmxnKWudU4doCgRXKc24tA
The extracted code: d9vu

Run the example:

CodePudding user response:

reference 1st floor milaoshu1020 response:
write well, the code is as follows:
 
Option Explicit

Private Sub Command1_Click ()
Label1. Caption=Text1. Text
Label2. Caption=Text1. Text
End Sub

Download address:
Link: https://pan.baidu.com/s/1HmxnKWudU4doCgRXKc24tA
The extracted code: d9vu

Run the example:

Well, is the text in the label font size change with the number in the text, for example, I input 5 in the text, the text in the label of the type size will be 5, word size,

CodePudding user response:

I have already solved,

CodePudding user response:

Label1. Fontsize=val (text1. Text) label12. Fontsize=val (text1. Text)

CodePudding user response:

Ha ha, such a simple question,
  • Related