?? form1.frm
字號:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 3195
ClientLeft = 60
ClientTop = 345
ClientWidth = 5175
LinkTopic = "Form1"
ScaleHeight = 3195
ScaleWidth = 5175
StartUpPosition = 3 'Windows Default
Begin VB.CommandButton Command1
Caption = "Command1"
Height = 615
Left = 3240
TabIndex = 1
Top = 120
Width = 1575
End
Begin VB.Label Label1
Caption = "Label1"
Height = 615
Left = 120
TabIndex = 0
Top = 2400
Width = 2415
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim V0, G, t, ts
Function Xs(t As Single) As Single
V0 = 150
Xs = V0 * t
End Function
Function Ys(t As Single) As Single
G = 9.8
Ys = 0.5 * G * t ^ 2
End Function
Private Sub command1_Click()
Dim t As Single
For t = 0 To 24 Step 0.5
Delay
x = Xs(t) + 100
y = Ys(t) + 100
FillColor = RGB(0, 0, 255)
FillStyle = 0
Circle (x, y), 200, RGB(255, 0, 0)
Next t
End Sub
Private Sub Delay()
For i = 0 To 500000
Next i
Cls
End Sub
Private Sub Form_Load()
Command1.Caption = "水平拋射開始!"
Label1.Caption = "水平拋射:V0=150, G=9.8, t=(0,2,4,...24)"
End Sub
Private Sub Timer1_Timer()
End Sub
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -