pexam11_7.frm
来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 125 行
FRM
125 行
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 2400
ClientLeft = 60
ClientTop = 345
ClientWidth = 3240
LinkTopic = "Form1"
ScaleHeight = 2400
ScaleWidth = 3240
StartUpPosition = 3 '窗口缺省
Begin VB.PictureBox Picture1
Height = 2100
Left = 120
ScaleHeight = 2040
ScaleWidth = 2040
TabIndex = 2
Top = 120
Width = 2100
Begin VB.Line Line1
BorderColor = &H000000FF&
BorderWidth = 2
X1 = 960
X2 = 960
Y1 = 960
Y2 = 360
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "45"
Height = 180
Index = 7
Left = 120
TabIndex = 6
Top = 960
Width = 180
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "30"
Height = 180
Index = 6
Left = 960
TabIndex = 5
Top = 1680
Width = 180
End
Begin VB.Shape Shape2
Height = 2000
Left = 10
Shape = 3 'Circle
Top = 10
Width = 2000
End
Begin VB.Label Label1
AutoSize = -1 'True
Caption = "15"
Height = 180
Index = 5
Left = 1725
TabIndex = 4
Top = 960
Width = 180
End
Begin VB.Label Label1
Caption = "0"
Height = 180
Index = 4
Left = 960
TabIndex = 3
Top = 120
Width = 180
End
End
Begin VB.Timer Timer1
Enabled = 0 'False
Left = 2520
Top = 1200
End
Begin VB.CommandButton Command2
Caption = "停止"
Height = 375
Left = 2400
TabIndex = 1
Top = 720
Width = 735
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 375
Left = 2400
TabIndex = 0
Top = 240
Width = 735
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim arph
Private Sub Command1_Click()
Timer1.Enabled = True
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End Sub
Private Sub Form_Load()
Timer1.Interval = 1000
Timer1.Enabled = False
Picture1.Scale (-1, 1)-(1, -1)
Line1.X1 = 0: Line1.Y1 = 0
Line1.X2 = 0: Line1.Y2 = 0.7
arph = 0
End Sub
Private Sub Timer1_Timer()
arph = arph + 3.14159265 / 30
Line1.Y2 = 0.7 * Cos(arph)
Line1.X2 = 0.7 * Sin(arph)
End Sub
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?