Lotreck » 11.04.2008 (Пт) 14:10
На форме TextBox и две кнопки
Private Type Struktura
pole_1 As String * 30
End Type
Dim Spisok As Struktura
Dim N As Long
Private Sub Command1_Click() ' заполнение
Open "c:\File.txt" For Random As #1 Len = Len(Spisok)
N = LOF(1) / Len(Spisok)
N = N + 1
Spisok.pole_1 = Text1.Text & vbCrLf
Put #1, N, Spisok
Close #1
Text1.Text = ""
Text1.SetFocus
' заполните несколько строк
End Sub
Private Sub Command2_Click() ' считывание
Open "c:\File.txt" For Random As #1 Len = Len(Spisok)
Get #1, 1, Spisok
Text1.Text = Spisok.pole_1
Close #1
End Sub
Private Sub Form_Load()
Text1.Text = ""
End Sub