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

📄 12.4.frm

📁 vb编程+从基础到实践光盘代码
💻 FRM
字号:
VERSION 5.00
Begin VB.Form Form1 
   BackColor       =   &H00FF8080&
   BorderStyle     =   1  'Fixed Single
   Caption         =   "文字的渐变推移效果"
   ClientHeight    =   4275
   ClientLeft      =   45
   ClientTop       =   435
   ClientWidth     =   6405
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   4275
   ScaleWidth      =   6405
   StartUpPosition =   3  'Windows Default
   WindowState     =   2  'Maximized
   Begin VB.Timer Timer1 
      Enabled         =   0   'False
      Left            =   5400
      Top             =   3240
   End
   Begin VB.Label Label1 
      Alignment       =   2  'Center
      AutoSize        =   -1  'True
      BackColor       =   &H00FF8080&
      BackStyle       =   0  'Transparent
      Height          =   435
      Left            =   2145
      TabIndex        =   0
      Top             =   960
      Width           =   2115
   End
End
Attribute VB_Name = "Form1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Private Sub Form_Load()
    Label1.FontSize = 20
    Label1.Caption = "新闻联播"                                     '初始化各控件属性
    Label1.ForeColor = vbRed
    Timer1.Interval = 50
    Timer1.Enabled = True
    Label1.Top = 1665
    Label1.Left = Form1.Width / 2 - Label1.Width / 2    '使文字居中
    Form1.WindowState = 2                                       '运行时最大化窗口
End Sub

Private Sub Timer1_Timer()
    Label1.Left = Form1.Width / 2 - Label1.Width / 2    '使文字水平居中
    Label1.FontSize = Label1.FontSize + 1               '使文字字体不断增大
    Label1.Top = Label1.Top + 20
    If Label1.FontSize >= 100 Then                              '当字体大于等于100时停
                                                                '止计时器
        Timer1.Enabled = False
    End If
End Sub

⌨️ 快捷键说明

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