【VB开源代码栏目提醒】:网学会员VB开源代码为您提供FormOptimize.frm参考,解决您在FormOptimize.frm学习中工作中的难题,参考学习。
VERSION 5.00
Object = "{6B7E6392-850A-101B-AFC0-4210102A8DA7}#1.3#0"; "COMCTL32.OCX"
Begin VB.Form FormOptimize
BorderStyle = 1 'Fixed Single
Caption = "速度优化"
ClientHeight = 5430
ClientLeft = 45
ClientTop = 330
ClientWidth = 4455
ClipControls = 0 'False
ControlBox = 0 'False
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 5430
ScaleWidth = 4455
ShowInTaskbar = 0 'False
StartUpPosition = 2 '屏幕中心
Begin VB.Timer tmrStart
Enabled = 0 'False
Interval = 50
Left = 3960
Top = 3720
End
Begin VB.OptionButton Opt_Detail
Caption = "高质量画面 "
Height = 495
Index = 2
Left = 240
TabIndex = 4
Top = 4320
Value = -1 'True
Width = 2175
End
Begin VB.OptionButton Opt_Detail
Caption = "中等画面"
Height = 495
Index = 1
Left = 240
TabIndex = 3
Top = 3960
Width = 2055
End
Begin VB.OptionButton Opt_Detail
Caption = "低质量画面"
Height = 495
Index = 0
Left = 240
TabIndex = 2
Top = 3600
Width = 1215
End
Begin VB.CheckBox Chk_Mute
Caption = "静音"
Height = 495
Left = 360
TabIndex = 1
Top = 1680
Width = 1575
End
Begin ComctlLib.Slider Sldr_ms
Height = 270
Left = 240
TabIndex = 0
Top = 600
Width = 3495
_ExtentX = 6165
_ExtentY = 476
_Version = 327682
LargeChange = 1
Min = 1
Max = 60
SelStart = 33
TickStyle = 3
Value = 33
End
Begin VB.CommandButton CmdExit
Caption = "退出 "
Height = 495
Left = 2640
TabIndex = 5
Top = 4200
Width = 855
End
Begin VB.CommandButton CmdStart
Caption = "开始游戏"
Height = 495
Left = 3480
TabIndex = 6
Top = 4200
Width = 855
End
Begin
VB.Line Line1
X1 = 120
X2 = 4335
Y1 = 4920
Y2 = 4920
End
Begin VB.Label LblWait
Caption = "Loading ... Please Wait"
BeginProperty Font
Name = "MS Sans Serif"
Size = 8.25
Charset = 0
Weight = 700
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 255
Left = 240
TabIndex = 10
Top = 5040
Width = 4215
End
Begin VB.Label Lbl2
Caption = "通过移动滑动条的值来设置响应时间,机器配置越好,值设置越高"
Height = 615
Left = 240
TabIndex = 9
Top = 840
Width = 3975
End
Begin VB.Label Lbl_ms
Caption = "33 ms"
Height = 375
Left = 3840
TabIndex = 8
Top = 600
Width = 495
End
Begin VB.Label Lbl1
Caption = "设定速度响应时间"
Height = 495
Left = 240
TabIndex = 7
Top = 120
Width = 4095
End
End
Attribute VB_Name = "FormOptimize"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'Due to different processing speed in on different computers,
'this form is created to set the timer interval of the game
Option Explicit
Private Sub CmdExit_Click() 'QUIT
Set FormOptimize = Nothing
Unload FormOptimize
End
End Sub
Private Sub CmdStart_Click() 'BEGIN GAME
FormOptimize.Height = 5800
tmrStart.Enabled = True
End Sub
Private Sub Form_Load()
FormOptimize.Height = 5245
End Sub
Private Sub Sldr_ms_Change() 'ALTER Slider
Lbl_ms.Caption = Str(Sldr_ms.Value) & " ms"
End Sub
Private Sub Sldr_ms_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = 83 And Shift = 4 Then Call CmdStart_Click
End Sub
Private Sub Sldr_ms_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
Lbl_ms.Caption = Str(Sldr_ms.Value) & " ms"
End Sub
Private Sub tmrStart_Timer()
FormBW.Visible = True
FormOptimize.Visible = False
End Sub