Контрольная работа: Адресная книга на языка Visual Basic
Unload Me
End Sub
Private Sub butOk_Click()
Dim sLine As String, sInfo As String, bInform As Boolean, arrRecord(7) As String
Dim iCount As Integer, iCountLine As Integer, iFileNum As Integer
If bPoisk Then
If Dir(Path & "data.dat") <> "" Then
iCount = 1: iCountLine = 0: bInform = False
Open Path & "data.dat" For Input As #1
'Считываем иформацию из файла и проверяем ее на совпадение
Do While Not EOF(1)
Line Input #1, sInfo
Select Case iCount
'Имя
Case 1
If InStr(Trim(txtName.Text), sInfo) <> 0 Then
bInform = True
iCount = 0
Else
iCount = iCount + 1
End If
'Очество
Case 2
If InStr(Trim(txtOtchectvo.Text), sInfo) <> 0 Then
bInform = True
iCount = 0
Else
iCount = iCount + 1
End If