home *** CD-ROM | disk | FTP | other *** search
- VERSION 2.00
- Begin Form Quick
- AutoRedraw = -1 'True
- BorderStyle = 3 'Fixed Double
- Caption = "Quick Exit"
- ClientHeight = 1095
- ClientLeft = 1800
- ClientTop = 1755
- ClientWidth = 3255
- Height = 1785
- Icon = FORM1.FRX:0000
- Left = 1740
- LinkTopic = "Quick"
- MaxButton = 0 'False
- ScaleHeight = 1095
- ScaleWidth = 3255
- Top = 1125
- Width = 3375
- Begin CommandButton Command1
- Caption = "Re&boot"
- Height = 1095
- Index = 2
- Left = 2160
- TabIndex = 2
- Top = 0
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "E&xit"
- DragIcon = FORM1.FRX:0302
- Height = 1095
- Index = 1
- Left = 1080
- TabIndex = 1
- Top = 0
- Width = 1095
- End
- Begin CommandButton Command1
- Caption = "&Restart"
- DragIcon = FORM1.FRX:0604
- Height = 1095
- Index = 0
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 1095
- End
- Begin Menu File
- Caption = "&File"
- Begin Menu Exit
- Caption = "E&xit"
- End
- End
- Begin Menu Options
- Caption = "&Options"
- Begin Menu Stay
- Caption = "&Stay On Top"
- End
- Begin Menu Warn
- Caption = "&Warnings"
- End
- End
- Begin Menu About
- Caption = "&About"
- End
- Declare Function ExitWindows Lib "User" (ByVal dwReturnCode As Long, ByVal wReserved As Integer) As Integer
- 'Return To Dos
- Const EW_ExitWindows = &H0
- 'Reboot Computer
- Const EW_Rebootsystem = &H43
- 'Restart Windows
- Const Ew_RestartWindows = &H42
- Declare Sub setWindowPos Lib "User" (ByVal H%, ByVal HB%, ByVal X%, ByVal Y%, ByVal Cx%, ByVal Cy%, ByVal F%)
- Const SWP_NOSIZE = &H1 'Ignore size parameters
- Const SWP_NOMOVE = &H2 'Ignore position parameters
- Const SWP_SHOWWINDOW = &H40 'Display Windows
- Const HWND_TOPMOST = -1 'Make window float
- Const MB_YESNO = 4 'Define Buttons
- Const MB_ICONINFORMATION = 64 'Define Icon
- Const MB_DEFBUTTON2 = 256, IDYES = 6, IDNO = 7 'Define Other
- Sub About_Click ()
- Load about1
- captiontext0 = "This program is Freeware. Enjoy it!" + Chr$(10)
- captiontext1 = "If you have any suggestions, I can be" + Chr$(10)
- captiontext2 = "reached by e-mail at abciiia@aol.com" + Chr$(10)
- captiontext3 = "or by snail mail at" + Chr$(10)
- captiontext4 = "A.B. Collver III" + Chr$(10) + "6701 San Bonita, Apt 3BE" + Chr$(10) + "St. Louis, MO 63105"
- about1.Label3.Caption = captiontext0 + captiontext1 + captiontext2 + captiontext3 + captiontext4
- about1.Show 1
- End Sub
- Sub Command1_Click (Index As Integer)
- If warn.Checked <> True Then
- GoTo Continue
- Else Dim DgDef, Msg, Response, Title
- End If
- Continue:
- Select Case Index
- Case 0 'If index = 0, Restart Windows In Current Mode
- Msg = "Do you wish to Restart Windows?"
- GoSub MessageBox
- A% = ExitWindows(Ew_RestartWindows, 0)
- Case 1 'If index = 1, Exit To Dos
- Msg = "Do you wish to Exit Windows?"
- GoSub MessageBox
- A% = ExitWindows(EW_ExitWindows, 0)
- Case 2 'If index =2, Reboot Computer
- Msg = "Do you wish to Reboot your System?"
- GoSub MessageBox
- A% = ExitWindows(EW_Rebootsystem, 0)
- End Select
- MessageBox:
- If warn.Checked <> True Then
- Return
- Else
- Title = "Warning!"
- DgDef = MB_YESNO + MB_ICONINFORMATION + MB_DEFBUTTON2 'Describe Dialog Box
- Response = MsgBox(Msg, DgDef, Title)
- If Response = IDYES Then
- Return
- Else
- Exit Sub
- End If
- End If
- End Sub
- Sub Exit_Click ()
- Unload quick
- End Sub
- Sub Stay_Click ()
- Stay.Checked = Not Stay.Checked
- If Stay.Checked = True Then
- 'Sets Stay on Top
- wFlags% = SWP_NOMOVE Or SWP_NOSIZE
- Call setWindowPos(quick.hWnd, HWND_TOPMOST, 0, 0, 0, 0, wFlags%)
- 'Sets Stay on Top Off
- Else wFlags% = SWP_SHOWWINDOW
- Call setWindowPos(quick.hWnd, 1, quick.CurrentX, quick.CurrentY, quick.Width, quick.Height, wFlags%)
- SendKeys "%{TAB}" 'Transfers focus
- End If
- End Sub
- Sub Warn_Click ()
- warn.Checked = Not warn.Checked
- End Sub
-