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

📄 form1.frm

📁 vb程序中的闪烁的文字程序 可以实现动画文字
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   Caption         =   "Form1"
   ClientHeight    =   3870
   ClientLeft      =   60
   ClientTop       =   345
   ClientWidth     =   5565
   LinkTopic       =   "Form1"
   LockControls    =   -1  'True
   ScaleHeight     =   3870
   ScaleWidth      =   5565
   StartUpPosition =   2  '屏幕中心
   Begin VB.CommandButton Command2 
      Caption         =   "停止闪烁"
      Height          =   495
      Left            =   1080
      TabIndex        =   2
      Top             =   2880
      Width           =   975
   End
   Begin VB.Timer Timer1 
      Interval        =   500
      Left            =   1440
      Top             =   2880
   End
   Begin VB.CommandButton Command1 
      Caption         =   "退  出"
      Height          =   495
      Left            =   3240
      TabIndex        =   0
      Top             =   2880
      Width           =   975
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      BackStyle       =   0  'Transparent
      Caption         =   "闪烁的文字"
      BeginProperty Font 
         Name            =   "宋体"
         Size            =   21.75
         Charset         =   134
         Weight          =   400
         Underline       =   0   'False
         Italic          =   0   'False
         Strikethrough   =   0   'False
      EndProperty
      Height          =   855
      Left            =   360
      TabIndex        =   1
      Top             =   1320
      Width           =   4575
   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 Command2_Click()
If Timer1.Enabled = True Then
Timer1.Enabled = False
Command2.Caption = "开始闪烁"
Else
Command2.Caption = "停止闪烁"
Timer1.Enabled = True
End If
End Sub

    Private Sub Timer1_Timer()
    Chc Label1, 1, 3, 5, 8, 10, 12, 14
    End Sub
    Sub Chc(Cont As Control, Color1 As Integer, Color2 As Integer, Color3 As Integer, Color4 As Integer, Color5 As Integer, Color6 As Integer, Color7 As Integer)
    If Val(Cont.Tag) = Color1 Then
    Cont.Tag = Color2
    ElseIf Val(Cont.Tag) = Color2 Then
    Cont.Tag = Color3
    ElseIf Val(Cont.Tag) = Color3 Then
    Cont.Tag = Color4
    ElseIf Val(Cont.Tag) = Color4 Then
    Cont.Tag = Color5
    ElseIf Val(Cont.Tag) = Color5 Then
    Cont.Tag = Color6
    ElseIf Val(Cont.Tag) = Color6 Then
    Cont.Tag = Color7
    ElseIf Val(Cont.Tag) = Color7 Then
    Cont.Tag = Color1
    Else
    Cont.Tag = Color1
    End If
    Cont.ForeColor = QBColor(Cont.Tag)
    End Sub
    Private Sub Command1_Click()
    End
    End Sub


⌨️ 快捷键说明

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