- Код: Выделить всё
Private Sub Command1_Click()
Dim F As Long
Dim Stroka As String
Text6.Text = ""
CommonDialog1.Filter = "Òåêñòîâûå ôàéëû (*.txt) Ôàéëû äàííûõ (*.dat)|*.txt;*.dat"
CommonDialog1.ShowOpen
F = FreeFile
Text5.Text = CommonDialog1.FileName
Open CommonDialog1.FileName For Input As #F
Do While Not EOF(F)
Line Input #F, Stroka
Text6.Text = Text6.Text & Stroka
Loop
Close #F
End Sub
- Код: Выделить всё
Private Sub Command1_Click()Dim F As Long
Dim Stroka As StringText6.Text = ""CommonDialog1.Filter = "Òåêñòîâûå ôàéëû (*.txt) Ôàéëû äàííûõ (*.dat)|*.txt;*.dat"CommonDialog1.ShowOpenF = FreeFileText5.Text = CommonDialog1.FileNameOpen CommonDialog1.FileName For Input As #FDo While Not EOF(F)Line Input #F, StrokaText6.Text = Text6.Text & StrokaLoopClose #FEnd Sub