?? frmsplash.frm
字號:
VERSION 5.00
Begin VB.Form Splash
BorderStyle = 0 'None
Caption = "Form1"
ClientHeight = 3585
ClientLeft = 0
ClientTop = 0
ClientWidth = 6045
KeyPreview = -1 'True
LinkTopic = "Form1"
Picture = "FRMSPL~1.frx":0000
ScaleHeight = 3585
ScaleWidth = 6045
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Timer Timer1
Left = 600
Top = 2280
End
Begin VB.Label Label1
BackStyle = 0 'Transparent
Caption = "正在聯(lián)接數(shù)據(jù)庫服務(wù)器…………"
Height = 255
Index = 4
Left = 2115
TabIndex = 6
Top = 2520
Width = 2340
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "個人所有,違者必究 2005年11月"
Height = 180
Index = 6
Left = 1215
TabIndex = 5
Top = 3210
Width = 3600
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "試卷評閱"
BeginProperty Font
Name = "楷體_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 3
Left = 2430
TabIndex = 4
Top = 1920
Width = 780
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "定制試卷"
BeginProperty Font
Name = "楷體_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 2
Left = 2430
TabIndex = 3
Top = 1560
Width = 780
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "試題管理"
BeginProperty Font
Name = "楷體_GB2312"
Size = 9
Charset = 134
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 180
Index = 1
Left = 2430
TabIndex = 2
Top = 1200
Width = 780
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "本軟件供畢業(yè)設(shè)計用"
Height = 180
Index = 5
Left = 2115
TabIndex = 1
Top = 2880
Width = 1620
End
Begin VB.Label Label1
AutoSize = -1 'True
BackStyle = 0 'Transparent
Caption = "歡迎使用自測考試系統(tǒng)"
BeginProperty Font
Name = "隸書"
Size = 18
Charset = 134
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 360
Index = 0
Left = 1222
TabIndex = 0
Top = 360
Width = 3600
End
End
Attribute VB_Name = "Splash"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit
Private Sub Form_GotFocus()
On Error GoTo DealError
'測試是否可聯(lián)接到SQL Server服務(wù)器
Me.Enabled = False '在測試完成之前,禁止窗體響應(yīng)用戶操作
'創(chuàng)建與數(shù)據(jù)庫的聯(lián)接
Dim objCn As New Connection '定義并實例化聯(lián)接對象
With objCn '建立數(shù)據(jù)庫聯(lián)接
.Provider = "SQLOLEDB"
.ConnectionString = "User ID=sa;PWD=5201314;Data Source=(local);" & _
"Initial Catalog=自測考試"
.Open '打開數(shù)據(jù)庫聯(lián)接
.Close '關(guān)閉數(shù)據(jù)庫聯(lián)接
End With
Set objCn = Nothing '釋放數(shù)據(jù)庫聯(lián)接
Label1(4) = "已聯(lián)接到數(shù)據(jù)庫服務(wù)器" '提示聯(lián)接到數(shù)據(jù)庫服務(wù)器
Timer1.Interval = 3000 '啟動計數(shù)器,定時為三秒
Me.Enabled = True '允許窗體響應(yīng)用戶操作
Exit Sub
DealError:
'在不能正確聯(lián)接數(shù)據(jù)庫服務(wù)起伏時顯示提示信息
MsgBox "不能正確聯(lián)接數(shù)據(jù)庫服務(wù)器,請與系統(tǒng)管理員聯(lián)系!", vbCritical
Unload Me '關(guān)閉窗體
End Sub
Private Sub Form_Click()
Unload Me '關(guān)閉啟動屏幕
'顯示登錄窗口
SystemLogon.Show: SystemLogon.SetFocus
End Sub
Private Sub Form_KeyPress(KeyAscii As Integer)
Unload Me '關(guān)閉啟動屏幕
'顯示登錄窗口
SystemLogon.Show: SystemLogon.SetFocus
End Sub
Private Sub Label1_Click(Index As Integer)
Unload Me '關(guān)閉啟動屏幕
'顯示登錄窗口
SystemLogon.Show: SystemLogon.SetFocus
End Sub
Private Sub Timer1_Timer()
Unload Me '關(guān)閉啟動屏幕
'顯示登錄窗口
SystemLogon.Show: SystemLogon.SetFocus
End Sub
?? 快捷鍵說明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -