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

📄 zhitu.frm

📁 通过对确定图形的原样 直接在绘图框中绘制出图形
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H0000FF00&
   Caption         =   "Form1"
   ClientHeight    =   7875
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   9120
   ForeColor       =   &H0000FF00&
   LinkTopic       =   "Form1"
   ScaleHeight     =   7875
   ScaleWidth      =   9120
   StartUpPosition =   3  '窗口缺省
   Begin VB.PictureBox Picture1 
      BackColor       =   &H00FF00FF&
      ForeColor       =   &H00FF0000&
      Height          =   5895
      Left            =   480
      ScaleHeight     =   5835
      ScaleWidth      =   7995
      TabIndex        =   3
      Top             =   600
      Width           =   8055
   End
   Begin VB.CommandButton Command3 
      Caption         =   "退出"
      Height          =   495
      Left            =   7200
      TabIndex        =   2
      Top             =   6840
      Width           =   1215
   End
   Begin VB.CommandButton Command2 
      Caption         =   "清屏"
      Height          =   495
      Left            =   3600
      TabIndex        =   1
      Top             =   6840
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "绘图"
      Height          =   495
      Left            =   600
      TabIndex        =   0
      Top             =   6840
      Width           =   1215
   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 dt As Double
Dim i As Integer
Dim xs As Double
Dim ys As Double
Dim xe As Double
Dim ye As Double
xs = 320
ys = 440
dt = 4 * pi / 5
For i = 1 To 5
xe = 200 * Cos(pi / 2 + dt * i) + 320
ye = 200 * Sin(pi / 2 + dt * i) + 240
Form1.Picture1.DrawWidth = 2
Form1.Picture1.Line (xs, ys)-(xe, ye)
xs = xe
ys = ye
Next

Form1.Picture1.Circle (320, 240), 200
Command1.Enabled = False
Command2.Enabled = True
Command3.Enabled = False
End Sub

Private Sub Command2_Click()
Form1.Picture1.Cls
Command1.Enabled = True
Command2.Enabled = False
Command3.Enabled = True
End Sub

Private Sub Command3_Click()
End

End Sub

Private Sub Form_Load()
Dim l As Double
l = Picture1.ScaleHeight / Picture1.ScaleWidth
Form1.Picture1.ScaleWidth = 640
Form1.Picture1.ScaleHeight = l * Picture1.ScaleWidth
Form1.Picture1.Scale (0, 0)-(640, l * Picture1.ScaleWidth)
End Sub

⌨️ 快捷键说明

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