form1.frm

来自「VB源码,是初学者的福因.让你很快掌握VB编程」· FRM 代码 · 共 45 行

FRM
45
字号
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   2235
   ClientLeft      =   60
   ClientTop       =   390
   ClientWidth     =   4425
   LinkTopic       =   "Form1"
   ScaleHeight     =   2235
   ScaleWidth      =   4425
   StartUpPosition =   3  '窗口缺省
   Begin VB.CommandButton Command2 
      Caption         =   "开始"
      Height          =   375
      Left            =   3240
      TabIndex        =   1
      Top             =   1800
      Width           =   855
   End
   Begin VB.CommandButton Command1 
      Caption         =   "走动"
      Height          =   375
      Left            =   360
      TabIndex        =   0
      Top             =   360
      Width           =   615
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False



Private Sub Command2_Click()
 Dim i As Long
 Do While Command1.Left + Command1.Width <= Form1.Width
     Command1.Left = Command1.Left + 50
     For i = 0 To 2000000
     Next i
 Loop
End Sub

⌨️ 快捷键说明

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