Контрольная работа: Адресная книга на языка Visual Basic

Private Sub butDelete_Click()

On Error Resume Next

If lstMain.GetSelected > lstMain.GetAll Then Exit Sub

With User(lstMain.GetSelected)

.strName = vbNullString

.strOtchectvo = vbNullString

.strFamilia = vbNullString

.strAdress = vbNullString

.strKvartira = vbNullString

.strDoma = vbNullString

.strComment = vbNullString

.strPhone = vbNullString

End With

SaveData

GetData

End Sub

Private Sub butDial_Click()

If User(lstMain.GetSelected).strPhone = vbNullString Then Exit Sub

If blnDial = False Then

Open "COM" & Reg.RegRead("HKCU\Book\Port") For Output As #1

If Reg.RegRead("HKCU\Book\DialMode") = 0 Then

Print #1, "ATDT" & User(lstMain.GetSelected).strPhone

Else

Print #1, "ATDP" & User(lstMain.GetSelected).strPhone

End If

Close

blnDial = True

Else

Open "COM" & Reg.RegRead("HKCU\Book\Port") For Output As #1

К-во Просмотров: 578
Бесплатно скачать Контрольная работа: Адресная книга на языка Visual Basic