VERSION 5.00
Begin VB.Form frmDialogs 
   BackColor       =   &H00FFFFFF&
   Caption         =   "Dialogs"
   ClientHeight    =   3195
   ClientLeft      =   165
   ClientTop       =   735
   ClientWidth     =   4680
   LinkTopic       =   "Form1"
   ScaleHeight     =   3195
   ScaleWidth      =   4680
   StartUpPosition =   3  'Windows Default
   Begin VB.Menu mnuDialogs 
      Caption         =   "Диалоги"
      Begin VB.Menu mnuOkCancel 
         Caption         =   "диалог Ok-Cancel"
      End
      Begin VB.Menu mnuAbortRertryIgnore 
         Caption         =   "диалог Abort-Retry-Ignore"
      End
      Begin VB.Menu mnuYesNoCancel 
         Caption         =   "диалог Yes-No-Cancel"
      End
      Begin VB.Menu mnuYesNo 
         Caption         =   "диалог Yes-No"
      End
      Begin VB.Menu mnuRetryCancel 
         Caption         =   "диалог Retry-Cancel"
      End
      Begin VB.Menu mnuSep1 
         Caption         =   "-"
      End
      Begin VB.Menu MnuGetMonth 
         Caption         =   "Выбор месяца"
      End
      Begin VB.Menu mnuExit 
         Caption         =   "Выход"
      End
   End
End
Attribute VB_Name = "frmDialogs"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub mnuAbortRertryIgnore_Click()
Dim dialogType As String
Dim dialogTitle As String
Dim dialogmsg As String
Dim Response As Integer

dialogType = vbAbortRetryIgnore + vbExlamation
dialogTitle = "Демонстрация окна сообщения"
dialogmsg = "Проверка связи"
Response = MsgBox(dialogmsg, dialogType, dialogTitle)
Select Case Response
Case vbAbort
MsgBox " Вы щелкнули на кнопке Abort"
Case vbRetry
MsgBox " Вы щелкнули на кнопке Retry"
Case vbIgnore
MsgBox " Вы щелкнули на кнопке Ignore"
End Select

End Sub

Private Sub mnuExit_Click()

Dim dialogType As String
Dim dialogTitle As String
Dim dialogmsg As String
Dim Response As Integer

dialogType = vbYesNo + vbCritical
dialogTitle = "программа Диалоги"
dialogmsg = "Вы увероенны, что хотите выйти"
Response = MsgBox(dialogmsg, dialogType, dialogTitle)
Select Case Response
Case vbYes
End
End Select
End Sub

Private Sub MnuGetMonth_Click()
frmgetMonth.Show 1
If frmgetMonth.Tag = "" Then
MsgBox "Вы закрыли диалог, не выбрав месяц."
Else
MsgBox "вы выбрали " + frmgetMonth.Tag
End If

End Sub

Private Sub mnuOkCancel_Click()
Dim dialogType As String
Dim dialogTitle As String
Dim dialogmsg As String
Dim Response As Integer

dialogType = vbOKCancel + vbExlamation
dialogTitle = "Демонстрация окна сообщения"
dialogmsg = "Проверка связи"
Response = MsgBox(dialogmsg, dialogType, dialogTitle)
Select Case Response
Case vbOK
MsgBox " Вы щелкнули на кнопке Ok"
Case vbCancel
MsgBox " Вы щелкнули на кнопке Cancel"
End Select
End Sub

Private Sub mnuRetryCancel_Click()
Dim dialogType As String
Dim dialogTitle As String
Dim dialogmsg As String
Dim Response As Integer

dialogType = vbRetryCancel + vbExlamation
dialogTitle = "Демонстрация окна сообщения"
dialogmsg = "Проверка связи"
Response = MsgBox(dialogmsg, dialogType, dialogTitle)
Select Case Response
Case vbRetry
MsgBox " Вы щелкнули на кнопке Retry"
Case vbCancel
MsgBox " Вы щелкнули на кнопке Cancel"
End Select

End Sub

Private Sub mnuYesNo_Click()
Dim dialogType As String
Dim dialogTitle As String
Dim dialogmsg As String
Dim Response As Integer

dialogType = vbYesNo + vbQustion
dialogTitle = "Демонстрация окна сообщения"
dialogmsg = "Проверка связи"
Response = MsgBox(dialogmsg, dialogType, dialogTitle)
Select Case Response
Case vbYes
MsgBox " Вы щелкнули на кнопке Yes"
Case vbNo
MsgBox " Вы щелкнули на кнопке No"
End Select
End Sub

Private Sub mnuYesNoCancel_Click()
Dim dialogType As String
Dim dialogTitle As String
Dim dialogmsg As String
Dim Response As Integer

dialogType = vbYesNoCancel + vbExlamation
dialogTitle = "Демонстрация окна сообщения"
dialogmsg = "Проверка связи"
Response = MsgBox(dialogmsg, dialogType, dialogTitle)
Select Case Response
Case vbYes
MsgBox " Вы щелкнули на кнопке Yes"
Case vbNo
MsgBox " Вы щелкнули на кнопке No"
Case vbCancel
MsgBox " Вы щелкнули на кнопке Cancel"
End Select

End Sub
