?? 啟動.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form 啟動
Caption = "啟動"
ClientHeight = 8400
ClientLeft = 60
ClientTop = 345
ClientWidth = 11850
Icon = "啟動.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
Picture = "啟動.frx":0442
ScaleHeight = 560
ScaleMode = 3 'Pixel
ScaleWidth = 790
Begin VB.Timer Timer1
Interval = 3000
Left = 1590
Top = 6030
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 1050
Top = 6000
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin VB.Label Label3
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "文件備份"
BeginProperty Font
Name = "隸書"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 2880
TabIndex = 5
Top = 6210
Width = 2220
End
Begin VB.Label Label6
BackStyle = 0 'Transparent
Caption = "程序設計:姚 巍"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
ForeColor = &H80000014&
Height = 405
Left = 4530
TabIndex = 4
Top = 7170
Width = 2805
End
Begin VB.Label Label5
BackStyle = 0 'Transparent
Caption = "程序設計:姚 巍"
BeginProperty Font
Name = "宋體"
Size = 15
Charset = 134
Weight = 700
Underline = 0 'False
Italic = -1 'True
Strikethrough = 0 'False
EndProperty
Height = 345
Left = 4590
TabIndex = 3
Top = 7200
Width = 2865
End
Begin VB.Label Label4
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "退出系統"
BeginProperty Font
Name = "隸書"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 6720
TabIndex = 2
Top = 6210
Width = 2220
End
Begin VB.Label Label2
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "管理人才"
BeginProperty Font
Name = "隸書"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 525
Left = 6720
TabIndex = 1
Top = 5430
Width = 2220
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "技術人才"
BeginProperty Font
Name = "隸書"
Size = 26.25
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
ForeColor = &H00000000&
Height = 525
Left = 2880
TabIndex = 0
Top = 5340
Width = 2220
End
End
Attribute VB_Name = "啟動"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
'API函數聲明
Private Declare Function FindWindow Lib "User32" Alias "FindWindowA" (ByVal lpClassName As String, ByVal lpWindowName As String) As Long
Private Declare Function SetWindowPos Lib "User32" (ByVal hwnd As Long, ByVal X As Long, ByVal hWndInsterAfter As Long, ByVal Y As Long, ByVal cx As Long, ByVal cy As Long, ByVal wFlags As Long) As Long
Private Declare Function PlaySound Lib "winmm.dll" Alias "PlaySoundA" (ByVal lpszName As String, ByVal hModule As Long, ByVal dwflags As Long) As Long
'常數聲明
Const REG_SZ = 1
Const HKEY_CURRENT_USER = &H80000001
Const SWP_HIDEWINDOW = &H80
Const SWP_SHOWWINDOW = &H40
'變量聲明
Dim hWndl As Long
Private Sub Form_Activate()
If 用戶登錄.Falg = 1 Then
Label1.Visible = True: Label2.Visible = True
Label3.Visible = True: Label4.Visible = True
End If
End Sub
Private Sub Form_Click()
If 用戶登錄.Falg <> 1 Then
用戶登錄.Show
End If
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
If KeyAscii <> 0 Then
If 用戶登錄.Falg <> 1 Then
用戶登錄.Show
End If
End If
End Sub
Private Sub Form_Load()
Dim A As String
Dim B As Integer
A = Me.hwnd
B = 0
Disabled A, B
Me.Left = 0: Me.Top = 0
Label1.Visible = False: Label2.Visible = False
Label3.Visible = False: Label4.Visible = False
PlaySound App.Path + "\Windows 登錄音.wav", 0&, &H1
'獲得窗體句柄
hWndl = FindWindow("Shell_traywnd", "")
'關閉任務欄
' SetWindowPos hWndl, 0, 0, 0, 0, 0, SWP_HIDEWINDOW
'得到屏幕當前分辨率
SystemParametersInfo SPI_GETWORKAREA, vbNull, VarPtr(apiRECT), 0
'將屏幕當前分辨率保存于 Screen.txt
Open App.Path + "\" + "Screen.txt" For Output As #1
Write #1, apiRECT.Right
Close #1
'將屏幕分辨率改為800×600
SetDisplayMode 800, 600, 16
End Sub
Private Sub Form_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &H80000012: Label2.ForeColor = &H80000012
Label3.ForeColor = &H80000012: Label4.ForeColor = &H80000012
End Sub
Private Sub Label1_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label1.ForeColor = &HFF&
End Sub
Private Sub Label1_Click()
Unload Me
技術人才主菜單.Show
End Sub
Private Sub Label2_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label2.ForeColor = &HFF&
End Sub
Private Sub Label2_Click()
Unload Me
管理人才主菜單.Show
End Sub
Private Sub Label3_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label3.ForeColor = &HFF&
End Sub
Private Sub Label3_Click()
Dim FileName1, FileName2 As String
On Error GoTo A1
CommonDialog1.Filter = "*.mdb|*.mdb"
CommonDialog1.ShowOpen
FileName1 = CommonDialog1.FileName
CommonDialog1.ShowSave
FileName2 = CommonDialog1.FileName
A1:
If Err.Number = 75 Or Err.Number = 53 Then
Exit Sub
Else
If Err.Number = 70 Then
If FileName1 = FileName2 Then
MsgBox " 文件已經存在,請更改文件名 !", vbOKOnly + vbExclamation
Exit Sub
Else
Exit Sub
End If
Else
FileCopy FileName1, FileName2
End If
End If
End Sub
Private Sub Label4_MouseMove(Button As Integer, Shift As Integer, X As Single, Y As Single)
Label4.ForeColor = &HFF&
End Sub
Private Sub Label4_Click()
Quit
End Sub
Private Sub Quit()
'打開任務欄
SetWindowPos hWndl, 0, 0, 0, 0, 0, SWP_SHOWWINDOW
'讀取原屏幕分辨率數值
Open App.Path + "\" + "Screen.txt" For Input As #1
Input #1, apiRECT.Right
Close #1
'按原屏幕分辨率重新設置
Call SetWindowPos(hWndl, 0, 0, 0, 0, 0, SWP_SHOWWINDOW)
Select Case apiRECT.Right
Case 1024
SetDisplayMode 1024, 768, 16
Case 800
SetDisplayMode 800, 600, 16
Case 640
SetDisplayMode 640, 480, 16
End Select
Unload Me
End
End Sub
Private Sub Timer1_Timer()
If 用戶登錄.Falg <> 1 Then
用戶登錄.Show
End If
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -