?? mainform.frm
字號:
VERSION 5.00
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "COMDLG32.OCX"
Begin VB.Form MainForm
Caption = "NBA數據查詢系統"
ClientHeight = 6720
ClientLeft = 165
ClientTop = 540
ClientWidth = 9825
Icon = "MainForm.frx":0000
LinkTopic = "Form2"
LockControls = -1 'True
ScaleHeight = 6720
ScaleWidth = 9825
WindowState = 2 'Maximized
Begin VB.Timer Timer1
Interval = 2000
Left = 7680
Top = 480
End
Begin MSComDlg.CommonDialog CommonDialog1
Left = 9000
Top = -120
_ExtentX = 847
_ExtentY = 847
_Version = 393216
DialogTitle = "打開數據庫"
Filter = "數據庫文件|*.mdb|所有文件|*.*"
InitDir = "D:\新建文件夾\My Documents\demo"
End
Begin VB.Image Image1
Height = 4695
Index = 3
Left = 6000
Picture = "MainForm.frx":5882
Stretch = -1 'True
Top = 3120
Visible = 0 'False
Width = 3855
End
Begin VB.Image Image1
Height = 5535
Index = 7
Left = 3360
Picture = "MainForm.frx":E865
Stretch = -1 'True
Top = 4440
Visible = 0 'False
Width = 3855
End
Begin VB.Image Image1
Height = 5895
Index = 6
Left = 9960
Picture = "MainForm.frx":16844
Stretch = -1 'True
Top = 840
Visible = 0 'False
Width = 4695
End
Begin VB.Image Image1
Height = 4335
Index = 5
Left = 8280
Picture = "MainForm.frx":1F586
Stretch = -1 'True
Top = 4920
Visible = 0 'False
Width = 3375
End
Begin VB.Image Image1
Height = 5415
Index = 4
Left = 1800
Picture = "MainForm.frx":27B37
Stretch = -1 'True
Top = 1080
Visible = 0 'False
Width = 4215
End
Begin VB.Image Image1
Height = 6015
Index = 2
Left = 7080
Picture = "MainForm.frx":30945
Stretch = -1 'True
Top = 960
Visible = 0 'False
Width = 4815
End
Begin VB.Image Image1
Height = 4695
Index = 1
Left = 960
Picture = "MainForm.frx":38754
Stretch = -1 'True
Top = 3960
Visible = 0 'False
Width = 3735
End
Begin VB.Image Image1
Height = 5055
Index = 8
Left = 720
Picture = "MainForm.frx":41B06
Stretch = -1 'True
Top = 840
Visible = 0 'False
Width = 4095
End
Begin VB.Image Image1
Height = 10725
Index = 0
Left = 0
Picture = "MainForm.frx":49064
Stretch = -1 'True
Top = 0
Width = 15360
End
Begin VB.Menu file
Caption = "系統菜單"
Begin VB.Menu open
Caption = "打開數據庫"
End
Begin VB.Menu admin
Caption = "管理員登錄"
End
Begin VB.Menu shut1
Caption = "-"
End
Begin VB.Menu exit
Caption = "退出程序"
End
End
Begin VB.Menu data
Caption = "數據一覽"
Begin VB.Menu player_info
Caption = "球員信息"
End
Begin VB.Menu team_info
Caption = "球隊信息"
End
Begin VB.Menu coach_info
Caption = "教練信息"
End
Begin VB.Menu match_info
Caption = "比賽信息"
End
End
Begin VB.Menu search
Caption = "資料查詢"
Begin VB.Menu player_s
Caption = "球員查詢"
End
Begin VB.Menu team_s
Caption = "球隊查詢"
End
Begin VB.Menu coach_s
Caption = "教練查詢"
End
Begin VB.Menu match_s
Caption = "比賽查詢"
End
End
Begin VB.Menu statistics
Caption = "數據統計"
Begin VB.Menu player_st
Caption = "球員數據統計"
End
Begin VB.Menu team_st
Caption = "球隊數據統計"
End
End
Begin VB.Menu manage
Caption = "數據庫管理"
Begin VB.Menu player_add
Caption = "球員管理"
End
Begin VB.Menu player_change
Caption = "轉會管理"
End
Begin VB.Menu coach_add
Caption = "教練管理"
End
Begin VB.Menu team_add
Caption = "球隊管理"
End
Begin VB.Menu text_add
Caption = "添加文字記錄"
End
End
Begin VB.Menu order
Caption = "各項排名"
Begin VB.Menu team_o
Caption = "球隊排名"
End
Begin VB.Menu player_o
Caption = "球員數據統計排名"
End
Begin VB.Menu teams_o
Caption = "球隊數據統計排名"
End
End
Begin VB.Menu advance
Caption = "高級"
Begin VB.Menu control
Caption = "控制臺"
End
End
Begin VB.Menu help
Caption = "幫助"
Begin VB.Menu faq
Caption = "FAQ"
End
Begin VB.Menu shut2
Caption = "-"
End
Begin VB.Menu about
Caption = "關于"
End
End
End
Attribute VB_Name = "MainForm"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim num, newn As Integer '處理隨機圖片編號
Private Sub about_Click()
aboutForm.Show
End Sub
Private Sub admin_Click()
'獲得管理員權限
Dim password As String
If status > 0 Then
password = InputBox("請輸入管理員密碼:", "口令")
If password = "NBA" Then
status = 2
Call root
End If
End If
End Sub
Private Sub coach_add_Click()
'教練修改窗口
CoachForm.Command1.Enabled = True
CoachForm.Command2.Enabled = True
For i = 0 To 7
CoachForm.Text1(i).Locked = True
Next i
CoachForm.Image1.Enabled = False
CoachForm.Show
End Sub
Private Sub coach_info_Click()
'教練修改窗口
CoachForm.Command1.Enabled = False
CoachForm.Command2.Enabled = False
For i = 0 To 7
CoachForm.Text1(i).Locked = True
Next i
CoachForm.Image1.Enabled = False
CoachForm.Show
End Sub
Private Sub coach_s_Click()
'教練查詢
CoachSearch.Show
End Sub
Private Sub control_Click()
'控制臺
ComForm.Show
End Sub
Private Sub exit_Click()
'退出
Unload Me
End Sub
Private Sub faq_Click()
r = ShellExecute(hwnd, "OPEN", "Readme.html", vbNullString, "\..\NBADataBase", SW_SHOW)
End Sub
Private Sub Form_Load()
status = 0 '沒有任何操作權限
'1為一般權限
'2為管理員權限
Call root
num = 1
newn = 1
PlayerSQLStr = "Select * from Player"
TeamSQLStr = "Select * from Team"
CoachSQLStr = "Select *from Coach"
End Sub
Private Sub Form_Unload(Cancel As Integer)
End
End Sub
Private Sub match_info_Click()
MsgBox ("由于數據有限,未提供此功能,但實現和統計相同。")
End Sub
Private Sub match_s_Click()
MsgBox ("由于于數據有限,未提供此功能。")
End Sub
Private Sub open_Click()
'載入數據庫文件
CommonDialog1.Action = 1
dbpath = CommonDialog1.FileName
exepath = CommonDialog1.InitDir
If CommonDialog1.FileName <> "" Then
status = 1
Call root
End If
End Sub
Private Sub player_add_Click()
'球員修改
PlayerForm.Command1.Enabled = True
PlayerForm.Command2.Enabled = True
For i = 0 To 10
PlayerForm.Text1(i).Locked = True
Next i
PlayerForm.Image1.Enabled = False
PlayerForm.Show
End Sub
Private Sub player_change_Click()
PlayerChange.Show
End Sub
Private Sub player_info_Click()
'球員信息
PlayerForm.Command1.Enabled = False
PlayerForm.Command2.Enabled = False
For i = 0 To 10
PlayerForm.Text1(i).Locked = True
Next i
PlayerForm.Image1.Enabled = False
PlayerForm.Show
End Sub
Private Sub player_o_Click()
'球員排名
PlayerOrder.Show
End Sub
Private Sub player_s_Click()
'球員查找
PlayerSearch.Show
End Sub
Private Sub player_st_Click()
'球員統計
PlayerStatistics.Show
End Sub
Private Sub save_Click()
MsgBox ("未提供此項功能!")
End Sub
Private Sub team_add_Click()
'球隊修改
TeamForm.Command1.Enabled = True
TeamForm.Command2.Enabled = True
For i = 0 To 7
TeamForm.Text1(i).Locked = True
Next i
TeamForm.Text2.Locked = True
TeamForm.Image1.Enabled = False
TeamForm.Show
End Sub
Private Sub team_info_Click()
'球隊信息
TeamForm.Command1.Enabled = False
TeamForm.Command2.Enabled = False
For i = 0 To 7
TeamForm.Text1(i).Locked = True
Next i
TeamForm.Text2.Locked = True
TeamForm.Image1.Enabled = False
TeamForm.Show
End Sub
Private Sub team_o_Click()
'球隊排名
TeamOrder.Show
End Sub
Private Sub team_s_Click()
'球隊查詢
TeamSearch.Show
End Sub
Private Sub team_st_Click()
MsgBox ("無詳細數據,實現同球員統計。")
End Sub
Private Sub teams_o_Click()
MsgBox ("無詳細數據,實現同球員統計。")
End Sub
Private Sub text_add_Click()
'文字記錄
AdtxtForm.Show
End Sub
Private Sub Timer1_Timer()
Randomize
Image1(num).Visible = False
While newn = num
newn = Fix(Rnd * 8 + 1)
Wend
num = newn
Image1(num).Visible = True
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -