为了正常的体验网站,请在浏览器设置里面开启Javascript功能!

VB各种进度条

2013-07-17 12页 doc 514KB 109阅读

用户头像

is_180965

暂无简介

举报
VB各种进度条VB编写进度条已经发展很久了,也有很多好方法。 VB自带的进度条很难看,一般不用,要用的话,代码如下: Private Sub Command1_Click() Dim counter As Integer Dim workarea(25000) As String ProgressBar1.Min = LBound(workarea) ProgressBar1.Max = UBound(workarea) ProgressBar1.Visible = True ProgressBar1.Value = ProgressB...
VB各种进度条
VB编写进度条已经发展很久了,也有很多好方法。 VB自带的进度条很难看,一般不用,要用的话,代码如下: Private Sub Command1_Click() Dim counter As Integer Dim workarea(25000) As String ProgressBar1.Min = LBound(workarea) ProgressBar1.Max = UBound(workarea) ProgressBar1.Visible = True ProgressBar1.Value = ProgressBar1.Min For counter = LBound(workarea) To UBound(workarea) workarea(counter) = "initial value" & counter ProgressBar1.Value = counter Next counter End Sub 各位看官,直接看下面: Text实现进度条:    Option Explicit Dim i As Integer Private Sub Form_Load() Timer1.Enabled = True   Text2.Width = (Form1.Width / 100) End Sub Private Sub Timer1_Timer() '进度条设置 Text2.Width = Text2.Width + (Form1.Width / 100) If (Text2.Width / Form1.Width) > 1 Then   Form2.Show '载入主画面   Unload Me End If End Sub Image进度条: Option Explicit Dim i As Integer Private Sub Form_Load()      JDT.Top = Lab.Top   JDT.Width = (Lab.Width / 100) End Sub Private Sub Timer1_Timer() '进度条设置 JDT.Width = JDT.Width + (Lab.Width / 100) If (JDT.Width / Lab.Width) > 1 Then   Form1.Show '载入主画面   Unload Me End If End Sub   那么更换N个image就会有N个进度条演示,下面示图,大家自己试试。 有看官马上问:那怎么显示百分比呢 这个不难,百分比代码: '加一个timer和一个label 'From:http://yxmhero1989.blog.163.com 'Author:Minghacker Dim b As Boolean Dim i As Integer Private Sub Timer1_Timer() If b Then i = i + 1 If Not b Then i = i - 1 If i > 100 Then i = 100: b = False If i < 0 Then i = 0: b = True Label1.Caption = CStr(i) + " %" End Sub Private Sub Form_Load() b = True i = 0 End Sub 这样两个配合,进度条加进度百分比,看客们该是熟悉了吧?具体时间和进度协调要看你的计算了。 Picture进度条: '例子需以下控件: 'Command1、Command2、Picture1:都采用默认属性设置 Dim ctEsc As Boolean Private Sub Form_Load()     '初始化控件    Picture1.AutoRedraw = True    Command1.Caption = "滚动条例子": Command2.Caption = "取消" End Sub Private Sub Command1_Click()    Dim I As Long, S As Long       ctEsc = False    S = 1000    For I = 1 To S       Me.Cls: Me.Print "显示:" & I       JinDuTiao I / S, "0.0" '显示进度条:进度,显示(即小数数位)       DoEvents       If ctEsc Then Me.Print "已取消": Exit Sub    Next    Me.Print "完毕" End Sub Private Sub Command2_Click()    ctEsc = True End Sub Private Sub JinDuTiao(Bi As Single, Optional nFormt As String = "0")    Dim W As Long, H As Long, nStr As String    Static UpBi As String       nStr = Format(Bi * 100, nFormt)    If Val(nStr) >= "100" Then nStr = 100       If UpBi = nStr Then Exit Sub       UpBi = nStr    W = Picture1.ScaleWidth: H = Picture1.ScaleHeight    Picture1.Cls    Picture1.DrawMode = 13    nStr = nStr & " %"    Picture1.CurrentX = (W - Picture1.TextWidth(nStr)) * 0.5    Picture1.CurrentY = (H - Picture1.TextHeight(nStr)) * 0.5    Picture1.Print nStr       Picture1.DrawMode = 14    Picture1.Line (0, 0)-(W * Bi, H), &HFF0000, BF    Picture1.Refresh End Sub shape进度条: '例子需以下控件:  'Command1、Command2、Label1、Label2、Shape1:都采用默认属性设置 Dim ctEsc As Boolean Private Sub Form_Load()    '初始化控件    Command1.Caption = "滚动条例子": Command2.Caption = "取消"    Label1.BorderStyle = 1: Label1.Caption = "0%"    Label1.Alignment = 2: Label1.Height = Me.TextHeight("A") * 1.5    Shape1.FillStyle = 0: Shape1.FillColor = &HFF0000: Shape1.DrawMode = 14    Shape1.Move Label1.Left, Label1.Top, 30, Label1.Height - Screen.TwipsPerPixelY * 2    Shape1.ZOrder End Sub Private Sub Command1_Click()    Dim I As Long, S As Long       ctEsc = False    S = 1000    For I = 1 To S       Me.Cls: Me.Print "显示:" & I       JinDuTiao I / S, "0.0" '显示进度条:进度,显示格式(即小数数位)       DoEvents       If ctEsc Then Me.Print "已取消": Exit Sub    Next    Me.Print "完毕" End Sub Private Sub Command2_Click()    ctEsc = True End Sub Private Sub JinDuTiao(Bi As Single, Optional nFormt As String = "0")    Label1.Caption = Int(Bi * 100) & "%"    Shape1.Width = Bi * Label1.Width End Sub   简单的就介绍至此,更简单的提示下,用控件,呵呵,这个最爽,可以做出各种效果。彩色到炫死!!!!  VB的第三方控件ccrpProgressBar是一个进度条的控件 是貌似不错,不过网上已经找不到了。 可以自己写过控件。 有个drowfiled不错,代码如下: '+++++++++++++++++++++++++++ Dim cb As Boolean Dim i  As Integer Dim plus1 As Boolean Dim plus2 As Boolean Dim plus3 As Boolean Dim m_beginColor                As OLE_COLOR Dim m_endColor                  As OLE_COLOR Dim m_Value                     As Byte Dim m_boxCount                  As Byte Dim m_boxSpace                  As Byte Const m_def_Value = 0 Const m_def_beginColor = &HFF Const m_def_endColor = &HFF00 Const m_def_boxCount = 30 Const m_def_boxSpace = 2 Public Property Get boxCount() As Byte   boxCount = m_boxCount End Property Public Property Let boxCount(ByVal New_boxCount As Byte)   m_boxCount = New_boxCount   If New_boxCount < 3 Then MsgBox "3-100": m_boxCount = 3   If New_boxCount > 100 Then MsgBox "3-100": m_boxCount = 100   PropertyChanged "boxCount" End Property Public Property Get boxSpace() As Byte   boxSpace = m_boxSpace End Property Public Property Let boxSpace(ByVal New_boxSpace As Byte)   m_boxSpace = New_boxSpace   If New_boxSpace > 5 Then MsgBox "1-5": m_boxSpace = 5   PropertyChanged "boxSpace" End Property Public Property Get Value() As Byte   Value = m_Value End Property Public Property Let Value(ByVal New_Value As Byte)   m_Value = New_Value   If New_Value > 100 Then MsgBox "1-100": m_Value = 100   PropertyChanged "Value"     ncolor1 = Right$("000000" & Hex$(m_beginColor), 6)   ncolor2 = Right$("000000" & Hex$(m_endColor), 6)     Call draw(ncolor1, ncolor2, m_boxCount, m_boxSpace) End Property Public Property Get beginColor() As OLE_COLOR   beginColor = m_beginColor End Property Public Property Let beginColor(ByVal New_beginColor As OLE_COLOR)   m_beginColor = New_beginColor   PropertyChanged "beginColor" End Property Public Property Get endColor() As OLE_COLOR   endColor = m_endColor End Property Public Property Let endColor(ByVal New_endColor As OLE_COLOR)   m_endColor = New_endColor   PropertyChanged "endColor" End Property Private Sub UserControl_InitProperties() i = 0: i2 = 0 m_beginColor = m_def_beginColor m_endColor = m_def_endColor m_Value = m_def_Value m_boxCount = m_def_boxCount m_boxSpace = m_def_boxSpace End Sub Public Sub Draw3DButton() 'pic, hdc As Long, X1 As Long, Y1 As Long, ByVal X2 As Long, ByVal Y2 As Long, mb As Boolean) On Error Resume Next   'UserControl, UserControl.Extender.hdc, 0, 0, UserControl.Width / Screen.TwipsPerPixelX + 1, UserControl.Height / Screen.TwipsPerPixelY + 1, 1)     x1 = 0   y1 = 0   x2 = UserControl.Width / Screen.TwipsPerPixelX + 1   y2 = UserControl.Height / Screen.TwipsPerPixelY + 1       shsh = UserControl.Height / Screen.TwipsPerPixelY + 1   If shsh > 1 Then   Dim i As Integer         Const k = 50     dx = y2 - y1     cdx = k / dx     If Not mb Then         j = 0         For i = y1 To y2 / 2             j = j + cdx             ccc = Int(255 - j) + 1             UserControl.Line (x1, i)-(x2, i), RGB(ccc, ccc, ccc), B         Next i                 For i = y2 / 2 To y2             j = j - cdx             ccc = Int(255 - j) + 1             UserControl.Line (x1, i)-(x2, i), RGB(ccc, ccc, ccc), B         Next i     Else         j = k         For i = y1 To y2             j = j - cdx             ccc = 255 - Int(j) + 1             UserControl.Line (x1, i)-(x2, i), RGB(ccc, ccc, ccc), BF         Next i     End If         End If End Sub Private Sub UserControl_ReadProperties(PropBag As PropertyBag) m_beginColor = PropBag.ReadProperty("beginColor", m_def_beginColor) m_endColor = PropBag.ReadProperty("endColor", m_def_endColor) m_Value = PropBag.ReadProperty("Value", m_def_Value) m_boxCount = PropBag.ReadProperty("boxCount", m_def_boxCount) m_boxSpace = PropBag.ReadProperty("boxSpace", m_def_boxSpace) End Sub Private Sub UserControl_Resize() If Width < 1000 Then Width = 1000 If Height < 50 Then Height = 50 Call Draw3DButton Static IsR As Boolean If IsR Then Exit Sub IsR = True If (Not m_boxCount = 0 And Not m_boxSpace = 0) Then     dw = ScaleWidth         Dim aw As Byte     cnt = m_boxCount     spa = m_boxSpace     aw = ((dw - spa) / cnt)         nw = (aw * cnt + 5)     Width = nw * Screen.TwipsPerPixelX End If IsR = False End Sub Public Sub draw(cl1, cl2, cnt, space) Dim color1 As String Dim color2 As String color1 = CStr(cl1) color2 = CStr(cl2) Dim aw As Byte     dw = ScaleWidth: aw = ((dw - space) / cnt) s = (dw / 100 * Value) / aw: i = s: j = i - 1 If i > cnt + 1 Then Exit Sub For j = 0 To i x1 = space + j * aw x2 = x1 + (aw - space) y1 = space - 1 y2 = (ScaleHeight - space) c11 = Val("&h" + Mid$(color1, 1, 2)) c12 = Val("&h" + Mid$(color1, 3, 2)) c13 = Val("&h" + Mid$(color1, 5, 2)) c21 = Val("&h" + Mid$(color2, 1, 2)) c22 = Val("&h" + Mid$(color2, 3, 2)) c23 = Val("&h" + Mid$(color2, 5, 2)) absC11C21_peraw = Int(Abs(c11 - c21) / cnt) absC12C22_peraw = Int(Abs(c12 - c22) / cnt) absC13C23_peraw = Int(Abs(c13 - c23) / cnt) If c11 > c21 Then plus1 = True Else plus1 = False If c12 > c22 Then plus2 = True Else plus2 = False If c13 > c23 Then plus3 = True Else plus3 = False If plus1 Then c31 = c11 - i * absC11C21_peraw If plus2 Then c32 = c12 - i * absC12C22_peraw If plus3 Then c33 = c13 - i * absC13C23_peraw If Not plus1 Then c31 = c11 + i * absC11C21_peraw If Not plus2 Then c32 = c12 + i * absC12C22_peraw If Not plus3 Then c33 = c13 + i * absC13C23_peraw If c31 <= 0 Then c31 = 0 If c32 <= 0 Then c32 = 0 If c33 <= 0 Then c33 = 0 If c31 >= 255 Then c31 = 255 If c32 >= 255 Then c32 = 255 If c33 >= 255 Then c33 = 255 Line (x1, y1)-(x2, y2), RGB(c33, c32, c31), BF Next j For j = i + 1 To cnt     x1 = space + j * aw     x2 = x1 + (aw - space)     y1 = space - 1     y2 = (ScaleHeight - space)     Line (x1, y1)-(x2, y2), RGB(255, 255, 255), BF Next j End Sub Private Sub UserControl_WriteProperties(PropBag As PropertyBag) Call PropBag.WriteProperty("beginColor", m_beginColor, m_def_beginColor) Call PropBag.WriteProperty("endColor", m_endColor, m_def_endColor) Call PropBag.WriteProperty("Value", m_Value, m_def_Value) Call PropBag.WriteProperty("boxCount", m_boxCount, m_def_boxCount) Call PropBag.WriteProperty("boxSpace", m_boxSpace, m_def_boxSpace) End Sub 效果如下图:   找到网上的一篇活文,可惜死掉了,因为这个控件不再了。 用ccrpProgressBar制作各式各样的进度条       VB的第三方控件ccrpProgressBar是一个进度条的控件,可以有多种形态供选择。比起VB 中自带的进度条控件ProgressBar更有个性。    在VB中自带了一个进度条控件ProgressBar,但功能简单。我向大家推荐一个VB的第三方进度条控件ccrpProgressBar。该控件功能强大,有多种形态供选择,而且只需要简单的设置控件的属性就能实现,非常的好用。下面通过一个例子向大家介绍该控件的用法。    (1) 加载控件    启动Visual Basic 6.0,创建一个并保存为"工程1.vbp",同时产生一个名为"Form1"的窗口。在工具箱的空白处单击鼠标右键,从弹出的快捷菜单中启动"部件"窗口,如图1所示。 图1    点击"浏览"按钮,从存放ccrpProgressBar控件的文件夹中找到ccrpprg.ocx文件。    点击"应用"后ccrpProgressBar控件就添加到工具箱中。如图2。 图2    (2) 设计窗体和控件    向窗体中添加9个ccrpProgressBar控件和一个Timer控件。如图3。 图3    Timer控件属性页的设置如图4所示。Interval的值设置为100,与ccrpProgressBar控件的默认值一致。Enabled设置为False。 图4    (3) ccrpProgressBar控件的主要属性    ·Max:最大值。默认100。    ·Min:最小值。默认0。    ·Value:进度条的当前值。    ·Alignment:显示示进度的文字的位置。分别为vbCenter(中间),vbLeftJustify(左边),vbRightJustify(右边)。    ·Appearance:进度条的3种外观。分别为prgFlat(平面),prg3D(立体) prg3Draised(立体凸起)。    ·BackColor:进度条的背景色。    ·FillColor:进度条的颜色。    ·ForeColor:表示进度文字的字体颜色。    ·Picture:进度条可用图片表示进度,从这里选择需要的图片。    ·Shape:进度条的形状。有prgRectangle(默认),prgEllipse和prgRoundedRect三种。    ·Smooth: 是否平滑显示进度。True为平滑显示进度。    ·Vertical:是否垂直显示进度条。True为垂直显示。    ·Style:进度条的风格。当选ChkGraphical时为用图片表示进度。    ·AutoCaption:表示进度的"文字提示"所采用的表现形式。CcrpPercentage为百分比的形式,ccrpValueOfMax为类似 1 of 100 的表现形式。Value为数字的表现形式。    (4)本例中ccrpProgressBar控件属性的具体设置    本例中共使用了9个ccrpProgressBar控件,每个ccrpProgressBar控件的具体设置如下:    1. CcrpProgressBar1:保持属性各项不变。    2. CcrpProgressBar2:Appearance的值设置为prg3D(表示用立体外观)。    3. CcrpProgressBar3:Appearance的值设置为prg3Draised(立体凸起),AutoCaption设为ccrpPercentage(百分比的形式表示进度),Alignment设为vbLeftJustify(表示进度的文字靠左)。    4. CcrpProgressBar4:BorderStyle设置为ccrpFixedSingle,AutoCaption设为ccrpPercentage(百分比的形式表示进度),Alignment设置为vbCenter(表示进度的文字在中间)    5. CcrpProgressBar5:Style设置为chkGraphical(用图片来表示进度)。单击"Picture"属性,选择你准备好的图片。同样,AutoCaption也设为百分比的形式表示进度,不过这次Alignment的值设置为vbRightJustify(进度文字靠右)。    6. CcrpProgressBar6:Shape设置为prgEllipse(椭圆型),AutoCaption设为ccrpValueOfMax(文字以类似 1 of 100 的表现形式)    7. CcrpProgressBar7:Shape设置为prgRoundedRect(圆角矩形),AutoCaption设为ccrpValue(数字形式)。    8. CcrpProgressBar8:Vertical设置为True,表示垂直显示进度条。Smooth设置为True,表示平滑显示进度。    9. CcrpProgressBar9:Vertical属性同8的设置,不过这回给它加上百分比显示, AutoCaption设为ccrpPercentage。    然后再分别调整好9个CcrpProgressBar控件的FillColor和ForeColor属性,搭配好颜色。使界面更协调。    (5)编写代码    设置好控件的属性后,在程序中加入以下代码,完成进度条的功能。 Dim i As Integer Private Sub Form_Load()   Timer1.Enabled = True   '2个垂直显示的进度条的位置   With ccrpProgressBar8    .Left = 5280    .Top = 360    .Height = 3800    .Width = 396   End With   With ccrpProgressBar9    .Left = 6200    .Top = 360    .Height = 3800    .Width = 396   End With End Sub Private Sub Timer1_Timer()   If i = 100 Then    End   End If   ccrpProgressBar1.Value = i   ccrpProgressBar2.Value = i   ccrpProgressBar3.Value = i   ccrpProgressBar4.Value = i   ccrpProgressBar5.Value = i   ccrpProgressBar6.Value = i   ccrpProgressBar7.Value = i   ccrpProgressBar8.Value = i   ccrpProgressBar9.Value = i   i = i + 1 '变量i自增 End Sub    运行程序,运行中的效果如图5所示。 下面一篇文章是网上盛传的。 一切都在变,就连进度条这个小东西也在发生着变化,由以往的单色形式变成了现今更加亮丽的过渡色形式甚至更为复杂漂亮的形式,给软件也增添了不少色彩。我在这里要告诉各位制作一种非常简便实用的制作方法:   一、实现原理   采用一个完整的图片来作为进度条,每次当进度条改变时,采用先贴图再用背景色擦去不需显示的一段进度的方法来实现进度条的变化,可实现制作任何复杂美观的进度条。   二、准备工作   首先需准备一个如下图样式的进度条图片(当然你可以做你自己喜欢的样式)。然后在窗体中加入一PictureBox控件,属性设置如下: AutoSize:True Appearance:Falt AutoRedraw:True ScaleMode: Pixel Picture:″准备的图片″   再加一辅助控件(只用于保存图片,方便快捷地使用进度条)Image,属性设置如下:   Picture:″准备的图片″   Visible:FALSE   :本文所讲的进度条并不是狭义上那种安装程序中常见的仅表示一个事件进程的进度条,而是把那些条形的,表示一个量的大小的图示统称为进度条。以此概念为基础让我们先来看看它的一些用途和类别,然后给出各类进度条的实现。   进度条的用途:   ※在一般软件中表示执行进度   ※在多媒体播放器中表示音量大小、频率节奏的变化…   ※在游戏中表示角色的能量、生命值…   进度条的分类:   由以上用途可知,进度条大体可分为两类   第一类:自动变化的进度条(如安装程序中的进度条)   第二类:可由用户操作的进度条(如音量调节)   以下是两类进度条的代码。   实现第一类的方法:   Const MaxValue = 100   Const MinValue = 0   Dim Gene As Single   Dim ProValue As Single   Sub InitData()   Gene = Picture1.ScaleWidth / (MaxValue - MinValue)   End Sub   Sub SetProBar(value As Single)   Dim X As Single   ProValue = value   If ProValue > MaxValue Then   ProValue = MaxValue   Else   If ProValue < MinValue Then   ProValue = MinValue   End If   End If   Text1.Text = ProValue   X = (ProValue - MinValue) * Gene   With Picture1   Picture1.Picture = Image1.Picture   Picture1.Line (X, 0)-(.ScaleWidth, .ScaleHeight), vbWhite, BF   End With   End Sub   以上是实现第一类进度条的全部代码,它有相当的独立性,不管你准备的进度条有多长,此代码都可无须改变而应用于你的系统中。其中,MAXVALUE、MINVALUE为此进度条所表示的最大最小值,可由实际应用而定。   PROVALUE 为当前的进度值,可由它得到当前值,以便处理。   SETPROBAR 为实际使用的过程,在软件中通过调用此过程来改变进度条的长度。VALUE 的取值为 MINVALUE~MAXVALUEINITDATA 是初始化进度条长度和实际要表示的范围的比例因子,在软件中首先要调用此过程完成初始化工作。   第二类实现方法:   要实现此类进度条,只需在第一类的基础上再加上响应用户操作的部分即可   具体所加代码如下:   Private Sub picture1_MouseMove(Button As Integer, Shift As Integer, X As Single,Y As Single)   If Button = 1 Then   Picture1_MouseDown Button, Shift, X, Y   End If   End Sub   Private Sub Picture1_MouseDown(Button As Integer, Shift As Integer, X As Single,Y As Single)   If Button = 1 Then   ProValue = Int(X / Gene + MinValue + 1)   SetProBar ProValue   End If   End Sub   应用示例:   建一工程,然后加入下列控件,并写入所示代码即可。   控件:两个PictureBox,组成控件数组(属性设置如上)但:picture1(0)的BorderStyle:None 两个Label,组成控件数组并分别以与自已Index 值相同的PictureBox为父控件(只需把Label绘在或粘贴在相应的PictureBox上即可)属性:   AutoSize:True   Alignment:Center   BackStyle:Transparent   Label(1): Caption:″当前音量0″   Enabled:False   Label(0): Caption:″0%″   一个Timer:属性:Interval:50   三、实例   一个自动的进度条和由用户控制的进度条。   Option Explicit   ′如果有多个进度条且表示值的范围不同   ′则可设立一组范围值,最好能通过INDEX   ′值同自已的进度条建立对应关系,以方便处理   Const MaxValue = 100   Const MinValue = 0   Dim Gene As Single   Dim ProValue(1) As Single   ′生成比例因子,必须首先执行   Sub InitData()   Gene = Picture1(0).ScaleWidth / (MaxValue - MinValue)   End Sub   ′根据当前进度值设置进度条,INDEX指出是哪个进度条的值   Sub SetProBar(value As Single, Index As Integer)   Dim X As Single   Dim BkColor As Long   ProValue(Index) = value   ′对当前进度值超出范围的处理   If ProValue(Index) > MaxValue Then   ProValue(Index) = MaxValue   Else   If ProValue(Index) < MinValue Then   ProValue(Index) = MinValue   End If   End If   ′在存在多个进度条时分别设置各进度条的不同文本   Select Case Index   Case 1   Label1(Index).Caption = ProValue(Index) & ″%″   Case 0   Label1(Index).Caption = ″当前音量″ & ProValue(Index)   End Select   ′计算出当前进度值所对应的进度条位置   X = (ProValue(Index) - MinValue) * Gene   With Picture1(Index).Picture = Image1.Picture   ′把当前进度值所对应的进度条位置之后的图片用白色盖住   ′它是此法实现思路的核心   Select Case Index   Case 1   bkcolor = vbWhite   Case 0   bkcolor = vbMenuBar   End Select   Picture1(Index).Line (X, 0)-(.ScaleWidth, _ .ScaleHeight), bkcolor, BF   End With   End Sub   ′首先初始化比例因子   Private Sub Form_Load()   InitData   End Sub   ′在用户操作INDEX为0的进度条时的响应   Private Sub picture1_MouseMove(Index As Integer, _    Button As Integer, Shift As Integer, X As Single, Y As Single)   If Button = 1 And Index = 0 Then   Picture1_MouseDown Index, Button, Shift, X, Y   End If   End Sub   ′根据当前鼠标坐标的X值(进度条若为纵向则使用Y值)   ′计算出所对应的当前进度值,然后设置进度条   Private Sub Picture1_MouseDown(Index As Integer, _    Button As Integer, Shift As Integer, X As Single, Y As Single)   If Button = 1 And Index = 0 Then   ProValue(Index) = Int(X / Gene + MinValue + 1)   SetProBar ProValue(Index), Index   End If   End Sub   ′在演示中以定时器定时设置进度   ′实际使用时当然是按事件完成的   ′百分比来设置进度   Private Sub Timer1_Timer()   Static curval As Single   SetProBar curval, 1   curval = (curval + 1) Mod MaxValue   If curval = 0 Then   curval = MinValue   End If   End Sub 12/12
/
本文档为【VB各种进度条】,请使用软件OFFICE或WPS软件打开。作品中的文字与图均可以修改和编辑, 图片更改请在作品中右键图片并更换,文字修改请直接点击文字进行修改,也可以新增和删除文档中的内容。
[版权声明] 本站所有资料为用户分享产生,若发现您的权利被侵害,请联系客服邮件isharekefu@iask.cn,我们尽快处理。 本作品所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用。 网站提供的党政主题相关内容(国旗、国徽、党徽..)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。

历史搜索

    清空历史搜索