Контрольная работа: Адресная книга на языка Visual Basic
If Reg.RegRead("HKCU\Book\OnTop") = True Then SetTop hWnd, True
End Sub
Public Sub GetData()
On Error Resume Next
Dim Cnt As Long
lstMain.ItemClear
If bPoisk Then
If Not Exist(Path & "search.dat") Then Exit Sub
Open Path & "search.dat" For Input As #1
Else
If Not Exist(Path & "data.dat") Then Exit Sub
Open Path & "data.dat" For Input As #1
End If
Open Path & "data.dat" For Input As #1
While Not EOF(1)
ReDim Preserve User(Cnt)
Line Input #1, User(Cnt).strName
Line Input #1, User(Cnt).strOtchectvo
Line Input #1, User(Cnt).strFamilia
Line Input #1, User(Cnt).strAdress
Line Input #1, User(Cnt).strDoma
Line Input #1, User(Cnt).strKvartira
Line Input #1, User(Cnt).strPhone
Line Input #1, User(Cnt).strComment
lstMain.ItemAdd User(Cnt).strPhone & String(6, " ") & User(Cnt).strName
Cnt = Cnt + 1
Wend
Close
Slider.SetMax lstMain.GetMax