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

📄 frmexample.frm

📁 大量优秀的vb编程
💻 FRM
字号:
VERSION 5.00
Object = "{5A903D02-B7CC-11D4-9A46-444553546170}#6.0#0"; "ProgressBar.ocx"
Begin VB.Form frmExample 
   BorderStyle     =   3  'Fixed Dialog
   Caption         =   "颜色渐变进度条"
   ClientHeight    =   1455
   ClientLeft      =   45
   ClientTop       =   330
   ClientWidth     =   2670
   BeginProperty Font 
      Name            =   "Tahoma"
      Size            =   8.25
      Charset         =   0
      Weight          =   400
      Underline       =   0   'False
      Italic          =   0   'False
      Strikethrough   =   0   'False
   EndProperty
   LinkTopic       =   "Form1"
   MaxButton       =   0   'False
   MinButton       =   0   'False
   ScaleHeight     =   1455
   ScaleWidth      =   2670
   StartUpPosition =   3  '窗口缺省
   Begin GradientProgressBar.Progress Progress2 
      Height          =   225
      Left            =   1680
      TabIndex        =   3
      Top             =   1080
      Width           =   855
      _ExtentX        =   1508
      _ExtentY        =   397
   End
   Begin GradientProgressBar.Progress Progress1 
      Height          =   375
      Left            =   120
      TabIndex        =   2
      Top             =   360
      Width           =   2415
      _ExtentX        =   4260
      _ExtentY        =   661
   End
   Begin VB.Timer Timer2 
      Interval        =   110
      Left            =   1440
      Top             =   360
   End
   Begin VB.Timer Timer1 
      Interval        =   70
      Left            =   1080
      Top             =   480
   End
   Begin VB.Label lblUpload 
      BackStyle       =   0  'Transparent
      Caption         =   "文件正在下载: "
      Height          =   495
      Left            =   120
      TabIndex        =   1
      Top             =   1080
      Width           =   2175
   End
   Begin VB.Line Line1 
      X1              =   3600
      X2              =   -120
      Y1              =   960
      Y2              =   960
   End
   Begin VB.Label lblLoading 
      AutoSize        =   -1  'True
      BackStyle       =   0  'Transparent
      Caption         =   "程序正在载入.."
      Height          =   204
      Left            =   120
      TabIndex        =   0
      Top             =   120
      Width           =   1104
   End
End
Attribute VB_Name = "frmExample"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = False
Attribute VB_PredeclaredId = True
Attribute VB_Exposed = False
Option Explicit

Private Sub Form_Load()
'Set the percent to 0
Progress1.Percent = 0

'Tell ProgressBar to draw
Progress1.Refresh

'Define start/end colors of the gradient
'for the second progressbar
Progress1.EndColor = vbBlue
Progress2.EndColor = vbRed

'Set percent to 19
Progress2.Percent = 19

'Draw
Progress2.Refresh
End Sub

Private Sub Timer1_Timer()
'Add 1 percent to progressbar
Progress1.Percent = Progress1.Percent + 1

'Re-draw
Progress1.Refresh
If Progress1.Percent = 100 Then
    'Stop timer if percent is at 100
    Timer1.Enabled = False
    lblLoading.Caption = "程序载入完成!"
End If
End Sub

Private Sub Timer2_Timer()
'Add 1 percent to progressbar
Progress2.Percent = Progress2.Percent + 1

'Re-draw
Progress2.Refresh

'Update caption with percent
lblUpload.Caption = "文件正在下载: " & Progress2.Percent & "%"

If Progress2.Percent = 100 Then
    'Stop timer if percent is at 100
    Timer2.Enabled = False
    lblUpload.Caption = "文件下载结束"
End If
End Sub

⌨️ 快捷键说明

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