Private Sub Command1_Click()
Text1.Text = ""
With CommonDialog1
.InitDir = App.Path
.Filter = "文本文件|*.txt"
.ShowOpen
End With
Open CommonDialog1.FileName For Input As 1
Dim str As String
Do While Not EOF(1) ' 循环至文件尾。
Input #1, str
Text1.Text = Text1.Text & vbNewLine & str
Loop
Close 1
End Sub
Private Sub Command2_Click()
End
End Sub
就是读取问题答案给你了
添加一个文本框,然后,在窗体的Load过程中,读入相应的文本文件,这样行不行?