📄 shutdown.frm
字号:
VERSION 5.00
Object = "{75D4F148-8785-11D3-93AD-0000832EF44D}#2.0#0"; "FAST2003.ocx"
Begin VB.Form frmSystem
BorderStyle = 3 'Fixed Dialog
Caption = "System"
ClientHeight = 5010
ClientLeft = 45
ClientTop = 330
ClientWidth = 5715
Icon = "ShutDown.frx":0000
LinkTopic = "Form1"
LockControls = -1 'True
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5010
ScaleWidth = 5715
ShowInTaskbar = 0 'False
StartUpPosition = 2 'CenterScreen
Begin VB.Frame fraFrame
Caption = "Error descriptions"
Height = 1155
Index = 4
Left = 90
TabIndex = 14
Top = 3750
Width = 5535
Begin VB.CommandButton cmdGetError
Caption = "Get Description"
Height = 345
Left = 3870
TabIndex = 18
Top = 270
Width = 1500
End
Begin VB.TextBox txtDescription
BackColor = &H8000000F&
Height = 315
Left = 90
Locked = -1 'True
TabIndex = 16
Top = 690
Width = 5295
End
Begin VB.TextBox txtError
Height = 315
Left = 1770
TabIndex = 15
Text = "0"
Top = 300
Width = 795
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "Please, enter a number"
Height = 195
Left = 90
TabIndex = 17
Top = 390
Width = 1635
End
End
Begin VB.Frame fraFrame
Caption = "Shutdown"
Height = 780
Index = 3
Left = 90
TabIndex = 11
Top = 2835
Width = 5505
Begin VB.CommandButton cmdProperties
Caption = "System Properties"
Height = 375
Left = 3870
TabIndex = 13
Top = 225
Width = 1500
End
Begin VB.ComboBox cboView
Height = 315
Left = 180
Style = 2 'Dropdown List
TabIndex = 12
Top = 270
Width = 3435
End
End
Begin VB.Frame fraFrame
Caption = "Network dialogs"
Height = 1275
Index = 2
Left = 3645
TabIndex = 7
Top = 1380
Width = 1965
Begin VB.CommandButton cmdPrinter
Caption = "Search Printer"
Height = 375
Left = 225
TabIndex = 9
Top = 765
Width = 1500
End
Begin VB.CommandButton cmdComputer
Caption = "Search computer"
Height = 375
Left = 225
TabIndex = 8
Top = 270
Width = 1500
End
End
Begin VB.Frame fraFrame
Caption = "Standard dialogs"
Height = 1275
Index = 1
Left = 90
TabIndex = 2
Top = 1395
Width = 3390
Begin VB.CommandButton cmdDialog
Caption = "About dialog"
Height = 375
Left = 1755
TabIndex = 6
Top = 270
Width = 1500
End
Begin VB.CommandButton cmdRestart
Caption = "Restart dialog"
Height = 375
Left = 135
TabIndex = 5
Top = 270
Width = 1500
End
Begin VB.CommandButton cmdRun
Caption = "Run dialog"
Height = 375
Left = 135
TabIndex = 4
Top = 765
Width = 1500
End
Begin VB.CommandButton cmdShutDlg
Caption = "Shutdown dialog"
Height = 375
Left = 1755
TabIndex = 3
Top = 765
Width = 1500
End
End
Begin VB.Frame fraFrame
Caption = "Shutdown"
Height = 1230
Index = 0
Left = 90
TabIndex = 0
Top = 45
Width = 5505
Begin VB.ComboBox cboModes
Height = 315
Left = 180
Style = 2 'Dropdown List
TabIndex = 10
Top = 270
Width = 5190
End
Begin VB.CommandButton cmdShutDown
Caption = "&Shutdown"
Height = 375
Left = 3870
TabIndex = 1
Top = 720
Width = 1455
End
End
Begin FLWSystem.FWSysInfo objSysInfo
Left = 5220
Top = 2430
_ExtentX = 820
_ExtentY = 820
End
End
Attribute VB_Name = "frmSystem"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_Load()
With cboModes
Call .AddItem("Terminate process")
Call .AddItem("Terminate process and user disconnection")
Call .AddItem("Close system and the equipment (if auto power-off allowed)")
Call .AddItem("Close system and reboot")
Call .AddItem("Close system")
Call .AddItem("Full reset and reboot")
.ListIndex = 0
End With
With cboView
Call .AddItem("Hardware General")
Call .AddItem("Hardware Devices")
Call .AddItem("Hardware Profiles")
Call .AddItem("Hardware Perfomance")
Call .AddItem("Install Programs")
Call .AddItem("Windows Setup")
Call .AddItem("Startup Disk")
.ListIndex = 0
End With
End Sub
Private Sub cmdShutDown_Click()
Dim intMode As FLWSystem.flwShutModes
Select Case cboModes.ListIndex
Case 0
intMode = FLWSystem.flwShutTerminate
Case 1
intMode = FLWSystem.flwShutUserLogoff
Case 2
intMode = FLWSystem.flwShutPowerOff
Case 3
intMode = FLWSystem.flwShutReboot
Case 4
intMode = FLWSystem.flwShutShutdown
End Select
If MsgBox("Are you sure you want to shutdown the system?", vbQuestion Or vbYesNo) = vbYes Then
Call objSysInfo.Shutdown(intMode)
End If
End Sub
Private Sub cmdDialog_Click()
Call objSysInfo.AboutWindow("Hello world!", "Put here your comments", Me.Icon)
End Sub
Private Sub cmdRestart_Click()
Call objSysInfo.RestartDlg("Put here your comments" & vbCrLf, FLWSystem.flwShutReboot)
End Sub
Private Sub cmdRun_Click()
Call objSysInfo.RunDlg("My Title", "Put here your comments", False)
End Sub
Private Sub cmdShutDlg_Click()
Call objSysInfo.ShutDownDlg
End Sub
Private Sub cmdPrinter_Click()
Dim strName As String
Dim strDisplay As String
strName = objSysInfo.SearchNetPrinter("My title", strDisplay)
If strName <> "" Then
Call MsgBox(strName & " - " & strDisplay)
End If
End Sub
Private Sub cmdComputer_Click()
Dim strName As String
Dim strDisplay As String
strName = objSysInfo.SearchComputer("My title", strDisplay)
If strName <> "" Then
Call MsgBox(strName & " - " & strDisplay)
End If
End Sub
Private Sub cmdProperties_Click()
Select Case cboView.ListIndex
Case 0
Call objSysInfo.ShowProperties(FLWSystem.flwSystemHardwareGeneral)
Case 1
Call objSysInfo.ShowProperties(FLWSystem.flwSystemHardwareDevices)
Case 2
Call objSysInfo.ShowProperties(FLWSystem.flwSystemHardwareProfiles)
Case 3
Call objSysInfo.ShowProperties(FLWSystem.flwSystemHardwarePerfomance)
Case 4
Call objSysInfo.ShowProperties(FLWSystem.flwSystemInstallPrograms)
Case 5
Call objSysInfo.ShowProperties(FLWSystem.flwSystemWindowsSetup)
Case 6
Call objSysInfo.ShowProperties(FLWSystem.flwSystemStartupDisk)
End Select
End Sub
Private Sub cmdGetError_Click()
txtDescription = objSysInfo.GetSystemError(txtError)
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -