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

📄 三角曲线.frm

📁 三角形余弦曲线
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4275
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5955
   LinkTopic       =   "Form1"
   ScaleHeight     =   4275
   ScaleWidth      =   5955
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   495
      Left            =   3840
      TabIndex        =   3
      Top             =   3120
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "清屏"
      Height          =   495
      Left            =   2160
      TabIndex        =   2
      Top             =   3120
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   " 绘图"
      Height          =   495
      Left            =   600
      TabIndex        =   1
      Top             =   3120
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      BackColor       =   &H0000C000&
      Height          =   2415
      Left            =   600
      ScaleHeight     =   2355
      ScaleWidth      =   3795
      TabIndex        =   0
      Top             =   360
      Width           =   3855
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Const PI = 3.1415926

Private Sub Command1_Click()
Dim i As Integer
Dim j As Integer
Dim dt As Double
Dim x As Double
Dim y As Double
Form1.Picture1.Line (-PI / 4, 0)-(2.5 * PI, 0)
Form1.Picture1.Line (0, -1.2)-(0, 1.2)
i = 150
dt = 2 * PI / i
For j = 0 To i
x = j * dt
y = Sin(j * dt)
Form1.Picture1.PSet (x, y)
Next

End Sub

Private Sub Command2_Click()
Form1.Picture1.Cls
End Sub

Private Sub Command3_Click()
End
End Sub

Private Sub Form_Load()
  Form1.Picture1.Scale (-PI / 4, 1.2)-(9 * PI / 4, -1.2)
End Sub

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -