没必要自己写代码,TextBox有这个功能在设计环境下,将TextBox的MultiLine属性设置为True,ScrollBars属性设置为3 - Both
Unload form1 Load form1 form1.show Private Sub Command1_Click() Command1.Enabled = False End Sub Private Sub Form_Load() Command1.Enabled