📄 runfast.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Run"
ClientHeight = 2655
ClientLeft = 60
ClientTop = 345
ClientWidth = 6870
LinkTopic = "Form1"
ScaleHeight = 2655
ScaleWidth = 6870
StartUpPosition = 3 '窗口缺省
Begin VB.CommandButton Command1
Caption = "Run"
Height = 615
Left = 1320
TabIndex = 1
Top = 0
Width = 3735
End
Begin VB.Label L1
AutoSize = -1 'True
Caption = "8"
BeginProperty Font
Name = "Webdings"
Size = 72
Charset = 2
Weight = 400
Underline = 0 'False
Italic = 0 'False
Strikethrough = 0 'False
EndProperty
Height = 1455
Left = 2280
TabIndex = 0
Top = 960
Width = 1440
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
'
'VB循环结构演示
'
'本程序演示循环结构的用法。
'
'设计:曹新国
'日期:2008年4月
' 程序用法: 点击“Run”按钮,然后查看箭头左右移动的情况,可以在运行的时候改变窗口的宽度
'
Private Sub Command1_Click()
'共20个来回
For i = 1 To 20
'显示右箭头
L1.Caption = "8"
'一直移动到窗口的最右边
Do While L1.Left < Me.Width - L1.Width
'移动一小步(10像素)
L1.Left = L1.Left + 150
'等待0.01秒
st = Timer + 0.01
Do While st > Timer
DoEvents
Loop
Loop
'显示左箭头
L1.Caption = "7"
'向左移到窗口的最左边
Do While L1.Left > 0
L1.Left = L1.Left - 75
' delay for 0.01 second
st = Timer + 0.01
Do While st > Timer
DoEvents
Loop
Loop
Next i
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -