Home > Software engineering >  Rookie help - how to send the same textbox assignment for many times, such as online
Rookie help - how to send the same textbox assignment for many times, such as online

Time:10-21

Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long)

Private Sub Command1_Click ()
Text1. Text="first" 'this is the first need to display the contents of the
1000 'Sleep as here I suppose to do other
Text1. Text="" 'here I want to empty the value of the first
Sleep 1000 'continue to do anything else here
Text1. Text="second" 'this is the second time I hope shows the content of the
End Sub


Why can only display the content of the second, do not display the content of the first times? For help,


Another question, why don't the default textbox control array need. The text property?
Such as the following
Private Sub Command1_Click ()
Text1 (0)="hello" 'it with Text1 (0). The Text="hello" as the
End Sub

CodePudding user response:

 Private Declare Sub Sleep Lib "kernel32" (ByVal dwMilliseconds As Long) 

Private Sub Command1_Click ()
Text1. Text="first" 'this is the first need to display the contents of the
Text1.
Refresh 'see here to see here1000 'Sleep as here I suppose to do other
Text1. Text="" 'here I want to empty the value of the first
Text1.
Refresh 'see here to see hereSleep 1000 'continue to do anything else here
Text1. Text="second" 'this is the second time I hope shows the content of the
End Sub


Private Sub Command2_Click ()
Text1. Text="first" 'this is the first need to display the contents of the
DoEvents' see here to see here
1000 'Sleep as here I suppose to do other
Text1. Text="" 'here I want to empty the value of the first
DoEvents' see here to see here
Sleep 1000 'continue to do anything else here
Text1. Text="second" 'this is the second time I hope shows the content of the
End Sub



Text is the default property textbox, so don't have to write, a lot of control, the object has a default property,

CodePudding user response:

Top yachong


I usually use DoEvents let itself to deal with,

CodePudding user response:

Text1. Text="first"
Text1. Text=Text1. Text & amp; VbCrLf & amp; "A second"



CodePudding user response:

On the first floor is the solution,
  • Related