⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 form1.frm

📁 物体抛射,抛物线自动生成,简洁明了,直观反应空间物体运动状况
💻 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 + -