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

📄 form1.frm

📁 vb程序触类旁通百例源程序
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BorderStyle     =   0  'None
   Caption         =   "Form1"
   ClientHeight    =   6105
   ClientLeft      =   0
   ClientTop       =   0
   ClientWidth     =   8100
   LinkTopic       =   "Form1"
   Picture         =   "Form1.frx":0000
   ScaleHeight     =   6105
   ScaleWidth      =   8100
   ShowInTaskbar   =   0   'False
   StartUpPosition =   3  '窗口缺省
   Begin VB.Timer Timer1 
      Interval        =   100
      Left            =   0
      Top             =   0
   End
   Begin VB.Label Label1 
      BackStyle       =   0  'Transparent
      Caption         =   "退出"
      BeginProperty Font 
         Name            =   "华文彩云"
         Size            =   36
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      ForeColor       =   &H0000FFFF&
      Height          =   735
      Left            =   6240
      MouseIcon       =   "Form1.frx":10A08
      MousePointer    =   99  'Custom
      TabIndex        =   0
      Top             =   5160
      Width           =   1575
   End
   Begin VB.Image image1 
      Height          =   1200
      Left            =   3240
      Picture         =   "Form1.frx":10D12
      Top             =   480
      Width           =   1200
   End
   Begin VB.Image image2 
      Height          =   1200
      Index           =   0
      Left            =   0
      Picture         =   "Form1.frx":1154C
      Top             =   2400
      Visible         =   0   'False
      Width           =   1200
   End
   Begin VB.Image image2 
      Height          =   1200
      Index           =   1
      Left            =   1200
      Picture         =   "Form1.frx":11D86
      Top             =   3480
      Visible         =   0   'False
      Width           =   1200
   End
   Begin VB.Image image2 
      Height          =   1200
      Index           =   2
      Left            =   3480
      Picture         =   "Form1.frx":12654
      Top             =   2880
      Visible         =   0   'False
      Width           =   1200
   End
   Begin VB.Image image2 
      Appearance      =   0  'Flat
      Height          =   1200
      Index           =   3
      Left            =   5400
      Picture         =   "Form1.frx":12F40
      Top             =   2640
      Visible         =   0   'False
      Width           =   1200
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Label1_Click()
Unload Form1
End Sub

Private Sub Timer1_Timer()
    Static Forward, Down As Boolean, n As Integer
    Dim nl, nt As Long
    If (((image1.Left + image1.Width) > Form1.ScaleWidth) And Forward) Or ((image1.Left < 0) And Not Forward) Then
       Forward = Not Forward
    End If
    If Forward Then
       nl = image1.Left + 200
    Else
       nl = image1.Left - 200
    End If
    If (((image1.Top + image1.Height) > Form1.ScaleHeight) And Down) Or ((image1.Top < 0) And Not Down) Then
       Down = Not Down
    End If
    If Down Then
       nt = image1.Top + 200
    Else
       nt = image1.Top - 200
    End If
     image1.Move nl, nt
    If n > 3 Then n = 0
    image1.Picture = image2(n).Picture
    n = n + 1
End Sub

⌨️ 快捷键说明

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