Контрольная работа: Адресная книга на языка Visual Basic
End Sub
Private Sub txtPhone_KeyPress(KeyAscii As Integer)
If Not IsNumeric(Chr(KeyAscii)) And Not KeyAscii = 8 Then KeyAscii = 0
End Sub
Private Sub Form_Load()
If Reg.RegRead("HKCU\Book\OnTop") = True Then SetTop hWnd, True
End Sub
FrmOptions
Option Explicit
Private Sub butCancel_Click()
Unload Me
End Sub
Private Sub butOk_Click()
Reg.RegWrite "HKCU\Book\Port", txtPort
Reg.RegWrite "HKCU\Book\OnTop", chkOnTop.Value
If optDialMode(0).Value = True Then
Reg.RegWrite "HKCU\Book\DialMode", 0
Else
Reg.RegWrite "HKCU\Book\DialMode", 1
End If
If chkOnTop.Value = 1 Then
SetTop frmMain.hWnd, True
Else
SetTop frmMain.hWnd, False
End If
Unload Me
End Sub
Private Sub Form_Load()
On Error Resume Next