practice11_4.frm

来自「深圳大学的vb上机与教学的课件」· FRM 代码 · 共 70 行

FRM
70
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   1920
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   4065
   LinkTopic       =   "Form1"
   ScaleHeight     =   1920
   ScaleWidth      =   4065
   StartUpPosition =   2  '屏幕中心
   Begin VB.Timer Timer1 
      Interval        =   1000
      Left            =   3600
      Top             =   1320
   End
   Begin VB.Line Line1 
      X1              =   360
      X2              =   1800
      Y1              =   1560
      Y2              =   1560
   End
   Begin VB.Shape Shape1 
      FillStyle       =   2  'Horizontal Line
      Height          =   1215
      Left            =   360
      Shape           =   3  'Circle
      Top             =   240
      Width           =   1455
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Dim i, Cleft, LX1, LX2

Private Sub Form_Load()
  i = 0
  Cleft = Shape1.Left
  LX1 = Line1.X1
  LX2 = Line1.X2
End Sub

Private Sub Timer1_Timer()
  Shape1.Left = Shape1.Left + 600
  Line1.X1 = Line1.X1 + 600
  Line1.X2 = Line1.X2 + 600
  i = i + 1
  Select Case i
    Case 1
      Shape1.FillStyle = 4
      Line1.BorderWidth = Line1.BorderWidth + 1
    Case 2
      Shape1.FillStyle = 5
      Line1.BorderWidth = Line1.BorderWidth + 1
    Case 3
      Shape1.FillStyle = 6
      Line1.BorderWidth = Line1.BorderWidth + 1
    Case 4
      Shape1.FillStyle = 2
      Line1.BorderWidth = 1
      Shape1.Left = Cleft
      Line1.X1 = LX1
      Line1.X2 = LX2
      i = 0
   End Select
End Sub

⌨️ 快捷键说明

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