📄 动画演示.frm
字号:
VERSION 5.00
Begin VB.Form Form1
Caption = "Form1"
ClientHeight = 5010
ClientLeft = 60
ClientTop = 450
ClientWidth = 7980
LinkTopic = "Form1"
ScaleHeight = 5010
ScaleWidth = 7980
StartUpPosition = 3 '窗口缺省
Begin VB.Timer Timer1
Enabled = 0 'False
Interval = 400
Left = 240
Top = 2760
End
Begin VB.CommandButton Command2
Caption = "推出"
Height = 615
Left = 3480
TabIndex = 1
Top = 3360
Width = 1575
End
Begin VB.CommandButton Command1
Caption = "开始"
Height = 615
Left = 720
TabIndex = 0
Top = 3360
Width = 1455
End
Begin VB.Image Image3
Height = 1935
Left = 5400
Picture = "动画演示.frx":0000
Stretch = -1 'True
Top = 360
Visible = 0 'False
Width = 1665
End
Begin VB.Image Image2
Height = 1950
Left = 2880
Picture = "动画演示.frx":100D
Top = 360
Visible = 0 'False
Width = 1620
End
Begin VB.Image Image1
Height = 1950
Left = 240
Picture = "动画演示.frx":2757
Top = 360
Width = 1620
End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Command1_Click()
If Command1.Caption = "开始" Then
Timer1.Enabled = True
Command1.Caption = "停止"
Else
Timer1.Enabled = False
Command1.Caption = "开始"
End If
End Sub
Private Sub Command2_Click()
Timer1.Enabled = False
End
End Sub
Private Sub Timer1_Timer()
If Image1.Left > Form1.ScaleWidth Then
Image1.Left = Form1.ScaleLeft - 200
End If
Image1.Move Image1.Left + 200
If Image1.Picture = Image2.Picture Then
Image1.Picture = Image3.Picture
Else
Image1.Picture = Image2.Picture
End If
End Sub
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -