home *** CD-ROM | disk | FTP | other *** search
- VERSION 5.00
- Begin VB.Form Form2
- BorderStyle = 3 'Fixed Dialog
- Caption = "Windows stuff"
- ClientHeight = 720
- ClientLeft = 4845
- ClientTop = 3660
- ClientWidth = 2640
- ControlBox = 0 'False
- BeginProperty Font
- Name = "Arial"
- Size = 8.25
- Charset = 0
- Weight = 700
- Underline = 0 'False
- Italic = 0 'False
- Strikethrough = 0 'False
- EndProperty
- LinkTopic = "Form2"
- MaxButton = 0 'False
- MinButton = 0 'False
- ScaleHeight = 720
- ScaleWidth = 2640
- ShowInTaskbar = 0 'False
- Begin VB.CommandButton Command1
- Caption = "Exit"
- Height = 375
- Left = 1320
- TabIndex = 3
- Top = 360
- Width = 1335
- End
- Begin VB.CommandButton Command4
- Caption = "Shut down"
- Height = 375
- Left = 1320
- TabIndex = 2
- Top = 0
- Width = 1335
- End
- Begin VB.CommandButton Command5
- BackColor = &H00C0C0C0&
- Caption = "hide toolbar"
- Height = 375
- Left = 0
- TabIndex = 1
- Top = 360
- Width = 1335
- End
- Begin VB.CommandButton Command24
- BackColor = &H00C0C0C0&
- Caption = "Dis Ctrl/Alt/Del"
- Height = 375
- Left = 0
- TabIndex = 0
- Top = 0
- Width = 1335
- End
- Attribute VB_Name = "form2"
- Attribute VB_GlobalNameSpace = False
- Attribute VB_Creatable = False
- Attribute VB_PredeclaredId = True
- Attribute VB_Exposed = False
- Dim mmflag As Boolean
- Dim sax As Integer
- Dim Say As Integer
- Private Declare Function mciSendString Lib "winmm.dll" Alias _
- "mciSendStringA" (ByVal lpstrCommand As String, ByVal _
- lpstrReturnString As String, ByVal uReturnLength As Long, _
- ByVal hwndCallback As Long) As Long
- Private Type RECT
- Left As Long
- Top As Long
- Right As Long
- Bottom As Long
- End Type
- Private Declare Function FindWindow Lib "user32" Alias "FindWindowA" _
- (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
- Private Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, _
- ByVal nCmdShow As Long) As Long
- Private Const SW_HIDE = 0
- Private Const SW_SHOWNORMAL = 1
- Private Sub Command1_Click()
- Form12.Show
- Unload form2
- End Sub
- Private Sub Command20_Click()
- Load DirControls
- DirControls.Show
- End Sub
- Private Sub Command24_Click()
- If Command24.Caption = "Dis Ctrl/Alt/Del" Then
- Command24.Caption = "en Ctrl/Alt/Del"
- Command24.Caption = "Dis Ctrl/Alt/Del"
- End If
- If Command24.Caption = "en Ctrl/Alt/Del" Then
- Dim Ret As Integer
- Dim pOld As Boolean
- Ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, True, pOld, 0)
- End If
- If Command24.Caption = "Dis Ctrl/Alt/Del" Then
- Ret = SystemParametersInfo(SPI_SCREENSAVERRUNNING, False, pOld, 0)
- End If
- End Sub
- Private Sub Command25_Click()
- Call ImplodeForm(Me, 2, 500, 1)
- Unload form2
- Form1.Show
- End Sub
- Private Sub Command3_Click()
- End Sub
- Private Sub Command4_Click()
- Dim temp
- temp = ExitWindowsEx(EWX_SHUTDOWN, 0)
- End Sub
- Private Sub Command5_Click()
- If Command5.Caption = "hide toolbar" Then
- Command5.Caption = "show toolbar"
- Command5.Caption = "hide toolbar"
- End If
- If Command5.Caption = "show toolbar" Then
- Dim Ret As Long
- Dim ClassName As String
- Dim StartWindow As Long
- ClassName = Space(256)
- ClassName = "Shell_TrayWnd"
- StartWindow = FindWindow(ClassName, vbNullString)
- Ret = ShowWindow(StartWindow, SW_HIDE)
- End If
- If Command5.Caption = "hide toolbar" Then
- ClassName = Space(256)
- ClassName = "Shell_TrayWnd"
- StartWindow = FindWindow(ClassName, vbNullString)
- Ret = ShowWindow(StartWindow, SW_SHOWNORMAL)
- End If
- End Sub
- Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
- Dim fml As Long
- Dim fmt As Long
- Dim a As Integer
- If mmflag = True Then
- fml = Me.Left: fmt = Me.Top
- If X > sax Then Me.Left = fml + (X - sax)
- If X < sax Then Me.Left = fml - (sax - X)
- If Y > Say Then Me.Top = fmt + (Y - Say)
- If Y < Say Then Me.Top = fmt - (Say - Y)
- End If
- End Sub
- Private Sub form_MouseDown(Button As Integer, Shift As Integer, X As Single, Y As Single)
- If mmflag = False Then
- sax = X
- Say = Y
- mmflag = True
- End If
- Me.MousePointer = vbSizePointer
- End Sub
- Private Sub Form_MouseUp(Button As Integer, Shift As Integer, X As Single, Y As Single)
- mmflag = False
- Me.MousePointer = vbDefault
- End Sub
-