程序代码
'新建窗体,添加command1,label1,hscroll1,timer1,picture1
Const pi = 3.1415926
Dim angle As Integer
Private Sub Form_Load() '调整空间尺寸,位置及初始参数
Me.ScaleMode = 3
Me.Caption = "曲柄滑块机构的演示"
Me.Width = 5000
Me.Height = 3500
Picture1.ScaleMode = 3
Picture1.AutoRedraw = True
Picture1.Move 0, 0, Me.ScaleWidth, 150
Command1.Caption = "开始(&B)"
Command1.Move 20, 160, 70, 30
Label1.Caption = "速度:"
Label1.Move 120, 170, 100, 30
HScroll1.Min = 1
HScroll1.Max = 20
HScroll1.Move 160, 160, 140, 30
Timer1.Interval = 20
Timer1.Enabled = False
End Sub
1