📄 formspeed.frm
字号:
VERSION 5.00
Begin VB.Form FormSpeed
BorderStyle = 3 'Fixed Dialog
Caption = "速度"
ClientHeight = 1515
ClientLeft = 4155
ClientTop = 3255
ClientWidth = 2820
Icon = "FormSpeed.frx":0000
LinkTopic = "Form1"
MaxButton = 0 'False
MinButton = 0 'False
ScaleHeight = 1515
ScaleWidth = 2820
ShowInTaskbar = 0 'False
Begin VB.CommandButton cmdApply
Caption = "应用"
Enabled = 0 'False
Height = 360
Left = 1995
TabIndex = 5
Top = 1020
Width = 720
End
Begin VB.CommandButton cmdCancel
Cancel = -1 'True
Caption = "取消"
Height = 360
Left = 1095
TabIndex = 4
Top = 1050
Width = 720
End
Begin VB.CommandButton cmdOK
Caption = "确定"
Height = 360
Left = 195
TabIndex = 3
Top = 1050
Width = 720
End
Begin VB.TextBox TextSpeed
Height = 285
Left = 495
MaxLength = 4
TabIndex = 1
Top = 540
Width = 510
End
Begin VB.Label label
Caption = "毫秒/帧"
Height = 240
Left = 1290
TabIndex = 2
Top = 570
Width = 1035
End
Begin VB.Label Label1
Caption = "设置电影的播放速度为:"
Height = 300
Left = 225
TabIndex = 0
Top = 135
Width = 2325
End
End
Attribute VB_Name = "FormSpeed"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub cmdApply_Click()
ControlForm.SpeedTimer.Interval = CInt(TextSpeed.Text) '设置定时器运行的时间
ControlForm.SpeedTimer.Enabled = True
cmdApply.Enabled = False
End Sub
Private Sub cmdCancel_Click()
Unload Me
ControlForm.SpeedTimer.Enabled = False
Play.ShockwaveFlash1.Play
End Sub
Private Sub cmdOK_Click()
ControlForm.SpeedTimer.Interval = CInt(TextSpeed.Text) '设置定时器运行的时间
ControlForm.SpeedTimer.Enabled = True '启动定时器
Unload Me
End Sub
Private Sub Form_Load()
SetWindowPos Me.hwnd, -1, 0, 0, 0, 0, 3 '设置总在最前面
TextSpeed.Text = ControlForm.SpeedTimer.Interval '设置广西框的文本为定时器运行的时间
cmdApply.Enabled = False
End Sub
Private Sub TextSpeed_Change()
cmdApply.Enabled = True
End Sub
Private Sub TextSpeed_KeyDown(KeyCode As Integer, Shift As Integer)
If KeyCode = vbKeyReturn Then
'回车键
Call cmdOK_Click
End If
End Sub
Private Sub TextSpeed_KeyPress(KeyAscii As Integer)
'限制输入为数字
If (KeyAscii < Asc("0") Or KeyAscii > Asc("9")) And KeyAscii <> vbKeyBack Then
KeyAscii = 0
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -