VERSION 5.00
Begin VB.Form EndDialog 
   AutoRedraw      =   -1  'True
   BorderStyle     =   0  'None
   Caption         =   "ر  ӵͼ"
   ClientHeight    =   2820
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   5085
   Icon            =   "E_Dialog.frx":0000
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   MaxButton       =   0   'False
   MinButton       =   0   'False
   PaletteMode     =   1  'UseZOrder
   ScaleHeight     =   2820
   ScaleWidth      =   5085
   ShowInTaskbar   =   0   'False
   Begin VB.PictureBox Main_Board 
      Appearance      =   0  'Flat
      BackColor       =   &H80000005&
      BorderStyle     =   0  'None
      ForeColor       =   &H80000008&
      Height          =   2820
      Left            =   0
      Picture         =   "E_Dialog.frx":000C
      ScaleHeight     =   2820
      ScaleWidth      =   5085
      TabIndex        =   0
      Top             =   0
      Width           =   5085
      Begin VB.OptionButton ShutDownComputer 
         Caption         =   "رռ(&S)"
         Height          =   240
         Left            =   900
         TabIndex        =   6
         Top             =   960
         Width           =   1695
      End
      Begin VB.OptionButton RebootComputer 
         Caption         =   "(&R)"
         Height          =   240
         Left            =   900
         TabIndex        =   5
         Top             =   1260
         Width           =   2055
      End
      Begin VB.OptionButton ExitProgramOnly 
         Caption         =   "СֵĹػԣ(&E)"
         Height          =   240
         Left            =   900
         TabIndex        =   4
         Top             =   1560
         Value           =   -1  'True
         Width           =   3435
      End
      Begin VB.CommandButton BotYes 
         Caption         =   "(&Y)"
         Height          =   315
         Left            =   540
         TabIndex        =   3
         Top             =   2280
         Width           =   1155
      End
      Begin VB.CommandButton BotNo 
         Caption         =   "(&N)"
         Height          =   315
         Left            =   2040
         TabIndex        =   2
         Top             =   2280
         Width           =   1155
      End
      Begin VB.CommandButton BotHelp 
         Caption         =   "(&H)"
         Enabled         =   0   'False
         Height          =   315
         Left            =   3540
         TabIndex        =   1
         Top             =   2280
         Width           =   1155
      End
      Begin VB.Image PicSw 
         Height          =   195
         Left            =   4770
         Picture         =   "E_Dialog.frx":7EDE
         Top             =   75
         Width           =   225
      End
      Begin VB.Label Top_Title 
         Appearance      =   0  'Flat
         BackColor       =   &H80000005&
         BackStyle       =   0  'Transparent
         Caption         =   "СֵĹػ"
         ForeColor       =   &H80000009&
         Height          =   210
         Left            =   555
         TabIndex        =   7
         Top             =   90
         Width           =   2205
      End
   End
   Begin VB.Image PicUp 
      Height          =   195
      Left            =   2760
      Picture         =   "E_Dialog.frx":7F9E
      Top             =   3000
      Visible         =   0   'False
      Width           =   225
   End
   Begin VB.Image PicDn 
      Height          =   195
      Left            =   3060
      Picture         =   "E_Dialog.frx":805E
      Top             =   3000
      Visible         =   0   'False
      Width           =   225
   End
End
Attribute VB_Name = "EndDialog"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False

Private Sub BotHelp_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub

Private Sub BotNo_Click()
  EndDialog.Hide
  Unload EndDialog
End Sub

Private Sub BotNo_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub

Private Sub BotYes_Click()
  If ShutDownComputer.Value Then
    AboutRet = ExitWindowsEx(1, 0)
  End If
  If RebootComputer.Value Then
    AboutRet = ExitWindowsEx(2, 0)
  End If
  If ExitProgramOnly.Value Then
    End
  End If
End Sub

Private Sub BotYes_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub

Private Sub ExitProgramOnly_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub

Private Sub Form_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub

Private Sub Form_Load()
  Dim TmpLoop As Integer
  Main_Board.Top = (Screen.Height - Height) / 2
  Main_Board.Left = (Screen.Width - Width) / 2
  EndDialog.Height = Screen.Height
  EndDialog.Width = Screen.Width
  SetWindowPos EndDialog.hWnd, -1, EndDialog.Left / 15, EndDialog.Top / 15, EndDialog.Width / 15, EndDialog.Height / 15, &H10 Or &H40
  EndDialog.Picture = CaptureWindow(GetDesktopWindow(), False, 0, 0, Screen.Width \ Screen.TwipsPerPixelX, Screen.Height \ Screen.TwipsPerPixelY)
  EndDialog.Show
  For TmpLoop = -639 To 799 Step 2
    EndDialog.Line (TmpLoop * 15, 0)-((TmpLoop + 639) * 15, 639 * 15)
    EndDialog.Line ((TmpLoop + 640) * 15, 1)-(TmpLoop * 15, 640 * 15)
  Next TmpLoop
End Sub

Private Sub PicSw_Click()
  Unload EndDialog
End Sub

Private Sub PicSw_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
  PicSw.Picture = PicDn.Picture
End Sub

Private Sub PicSw_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
  PicSw.Picture = PicUp.Picture
End Sub

Private Sub RebootComputer_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub

Private Sub ShutDownComputer_KeyPress(KeyAscii As Integer)
  If KeyAscii = Asc("S") Or KeyAscii = Asc("s") Then ShutDownComputer.SetFocus
  If KeyAscii = Asc("R") Or KeyAscii = Asc("r") Then RebootComputer.SetFocus
  If KeyAscii = Asc("E") Or KeyAscii = Asc("e") Then ExitProgramOnly.SetFocus
End Sub
