表單設計 |
---|
![]() |
執行畫面 |
![]()
|
Private Sub Command1_Click() Text1.Text = "" On Error GoTo Errhandler CommonDialog1.Filter = "Text files(*.txt) | *.txt" CommonDialog1.FilterIndex = 1 CommonDialog1.Action = 1 Open CommonDialog1.FileName For Input As #1 Do If EOF(1) Then Exit Do Line Input #1, Lstr Text1.Text = Text1.Text + Lstr + Chr(13) + Chr(10) Loop Close #1 Errhandler: Exit Sub End Sub Private Sub Command2_Click() Close #1 End End Sub |
|