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

📄 form1.frm

📁 vb源码大全
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   4020
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4725
   LinkTopic       =   "Form1"
   ScaleHeight     =   4020
   ScaleWidth      =   4725
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "退出"
      Height          =   495
      Left            =   2760
      TabIndex        =   2
      Top             =   3240
      Width           =   1215
   End
   Begin VB.CommandButton Command1 
      Caption         =   "心脏线"
      Height          =   495
      Left            =   600
      TabIndex        =   1
      Top             =   3240
      Width           =   1215
   End
   Begin VB.PictureBox Picture1 
      Height          =   3015
      Left            =   0
      ScaleHeight     =   2955
      ScaleWidth      =   4635
      TabIndex        =   0
      Top             =   0
      Width           =   4695
   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.14159
Dim a

Private Sub Command1_Click()    '注释:画抛物线
    '清除picture1内的图形
    Picture1.Cls
    'Scale方法设定用户坐标系,坐标原点在Picture1中心
    Picture1.ScaleMode = 0
    Picture1.ScaleMode = 3
    Picture1.Scale (-20, 20)-(20, -20)
    '设置绘线宽度
    Picture1.DrawWidth = 1
    '绘制坐标系的X轴及箭头线
    Picture1.Line (-20, 0)-(20, 0), vbBlue
    Picture1.Line (18, 1)-(20, 0), vbBlue
    Picture1.Line -(18, -1), vbBlue
    Picture1.ForeColor = vbBlue
    Picture1.Print "X"
    '绘制坐标系的Y轴及箭头线
    Picture1.Line (0, 20)-(0, -20), vbBlue
    Picture1.Line (1, 18)-(0, 20), vbBlue
    Picture1.Line -(-1, 18), vbBlue
    Picture1.Print "Y"
    '在指定位置显示原点
    Picture1.CurrentX = 1
    Picture1.CurrentY = -1
    Picture1.Print "O"
    '重设绘线宽度
    Picture1.DrawWidth = 2
    '用For循环绘点,使其按心脏线规律变化
For a = 0 To 2 * pi Step pi / 600
        Picture1.PSet (9 * (1 + Cos(a)) * Cos(a), 9 * (1 + Cos(a)) * Sin(a)), vbRed
    Next a
    '指定位置显示描述文字
    Picture1.CurrentX = -10
    Picture1.CurrentY = 10
    Picture1.ForeColor = vbBlack
    Picture1.Print "心脏线"
End Sub

Private Sub Command2_Click()
    Unload Me
End Sub

⌨️ 快捷键说明

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