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

📄 form1.frm

📁 vb电子书籍
💻 FRM
字号:
   VERSION 5.00
   Begin VB.Form Form1
      BackColor       =   &H80000000&
      Caption         =   "shape控件数组"
      ClientHeight    =   2490
      ClientLeft      =   60
      ClientTop       =   345
      ClientWidth     =   4140
      FillColor       =   &H00FF0000&
      BeginProperty Font
         Name            =   "宋体"
         Size            =   12
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H00FF0000&
      Icon            =   "Form1.frx":0000
      LinkTopic       =   "Form1"
      ScaleHeight     =   2490
      ScaleWidth      =   4140
      StartUpPosition =   2  '屏幕中心
      Begin VB.Shape Shape1
         Height          =   1215
         Index           =   4
         Left            =   3840
         Top             =   720
         Width           =   735
      End
      Begin VB.Shape Shape1
         Height          =   1215
         Index           =   3
         Left            =   3120
         Top             =   720
         Width           =   735
      End
      Begin VB.Shape Shape1
         Height          =   1215
         Index           =   2
         Left            =   2400
         Top             =   720
         Width           =   735
      End
      Begin VB.Shape Shape1
         Height          =   1215
         Index           =   1
         Left            =   1680
         Top             =   720
         Width           =   735
      End
      Begin VB.Shape Shape1
         Height          =   1215
         Index           =   0
         Left            =   960
         Top             =   720
         Width           =   735
      End
   End
   Attribute VB_Name = "Form1"
   Attribute VB_GlobalNameSpace = False
   Attribute VB_Creatable = False
   Attribute VB_PredeclaredId = True
   Attribute VB_Exposed = False
'CODE Manger By BcodeXRose
Dim mtop As Integer, mleft As Integer
Dim i As Integer, j As Integer, k As Integer
'##################################################################
'## 过程名称:Form_Load
'## 参数: 无
'##################################################################
Private Sub Form_Load()
    
    mtop = Shape1(0).Top
    mleft = Shape1(0).Left + Shape1(0).Width
    For i = 1 To 2
        For j = 1 To 2
            k = (i - 1) * 2 + j
            
            Shape1(k).Visible = True
            Shape1(k).Top = mtop: Shape1(k).Left = mleft
            mleft = mleft + Shape1(0).Width
        Next j
        mtop = mtop + Shape1(0).Width / 2
        mleft = Shape1(0).Left + Shape1(0).Width / 2
    Next i
    
End Sub

⌨️ 快捷键说明

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