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

📄 form0801.frm

📁 VB实验教程源码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "形状控件显示"
   ClientHeight    =   3135
   ClientLeft      =   60
   ClientTop       =   450
   ClientWidth     =   5580
   LinkTopic       =   "Form1"
   ScaleHeight     =   3135
   ScaleWidth      =   5580
   StartUpPosition =   3  '窗口缺省
   Begin VB.ComboBox Combo3 
      Height          =   300
      Left            =   3840
      TabIndex        =   5
      Top             =   840
      Width           =   1215
   End
   Begin VB.ComboBox Combo2 
      Height          =   300
      Left            =   2160
      TabIndex        =   3
      Top             =   840
      Width           =   1215
   End
   Begin VB.ComboBox Combo1 
      Height          =   300
      Left            =   480
      TabIndex        =   1
      Top             =   840
      Width           =   1215
   End
   Begin VB.Label Label3 
      Caption         =   "颜色"
      Height          =   255
      Left            =   3840
      TabIndex        =   4
      Top             =   360
      Width           =   975
   End
   Begin VB.Label Label2 
      Caption         =   "底纹"
      Height          =   255
      Left            =   2280
      TabIndex        =   2
      Top             =   360
      Width           =   975
   End
   Begin VB.Label Label1 
      Caption         =   "形状"
      Height          =   255
      Left            =   600
      TabIndex        =   0
      Top             =   360
      Width           =   975
   End
   Begin VB.Shape Shape1 
      BackColor       =   &H80000004&
      BackStyle       =   1  'Opaque
      Height          =   1455
      Left            =   1920
      Top             =   1440
      Width           =   1695
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit



Private Sub Combo1_Click()
'单击选择形状
    Shape1.Shape = Combo1.ListIndex
End Sub

Private Sub Combo2_Click()
'单击选择底纹
    Shape1.FillStyle = Combo2.ListIndex
End Sub

Private Sub Combo3_Click()
'单击选择颜色
    Select Case Combo3.ListIndex
    Case 0
        Shape1.BackColor = vbRed
    Case 1
        Shape1.BackColor = vbYellow
    Case 2
        Shape1.BackColor = vbBlue
    End Select
End Sub

Private Sub Form_Load()
'装载窗体
    Combo1.AddItem "矩形"
    Combo1.AddItem "正方形"
    Combo1.AddItem "椭圆形"
    Combo1.AddItem "圆形"
    Combo1.AddItem "圆角矩形"
    Combo1.AddItem "圆角正方形"
    Combo2.AddItem "实心"
    Combo2.AddItem "透明"
    Combo2.AddItem "垂直线"
    Combo2.AddItem "水平线"
    Combo2.AddItem "左下斜线"
    Combo2.AddItem "右下斜线"
    Combo2.AddItem "十字交叉线"
    Combo2.AddItem "斜交叉线"
    Combo3.AddItem "红"
    Combo3.AddItem "黄"
    Combo3.AddItem "蓝"
    Shape1.BackStyle = 1        '设置为不透明
End Sub

⌨️ 快捷键说明

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