问答文章1 问答文章501 问答文章1001 问答文章1501 问答文章2001 问答文章2501 问答文章3001 问答文章3501 问答文章4001 问答文章4501 问答文章5001 问答文章5501 问答文章6001 问答文章6501 问答文章7001 问答文章7501 问答文章8001 问答文章8501 问答文章9001 问答文章9501

vb里的进度条怎么做

发布网友 发布时间:2022-05-31 22:42

我来回答

3个回答

热心网友 时间:2023-04-25 18:26

系统自带进度条控件,在控件栏右键→部件 然后选择 microsoft windows common controls 6.0
有个自带的进度条
你也可以用shape picture image等控件模拟进度条
也可以自己手动写一个进度条控件
不过个人觉得用picturebox和image 模拟进度条方便好看点,可以设置一个漂亮的图片

热心网友 时间:2023-04-25 18:27

如果想要好看的进度条,一是自己写,再就是下载一个进度条控件,网上有的

热心网友 时间:2023-04-25 18:27

VERSION 5.00
Begin VB.UserControl UserControl1
ClientHeight = 510
ClientLeft = 0
ClientTop = 0
ClientWidth = 8055
ScaleHeight = 510
ScaleWidth = 8055
Begin VB.PictureBox Picture1
BackColor = &H8000000E&
Height = 525
Left = 0
ScaleHeight = 465
ScaleWidth = 11115
TabIndex = 0
Top = 0
Width = 11175
Begin VB.Label lblMsg
Alignment = 2 'Center
BackColor = &H80000009&
BackStyle = 0 'Transparent
Caption = "进度条"
ForeColor = &H000000FF&
Height = 180
Left = 5160
TabIndex = 1
Top = 135
Width = 600
End
Begin VB.Label lblColor
BackColor = &H00C00000&
Caption = "Label1"
Height = 495
Left = 0
TabIndex = 2
Top = 0
Width = 3495
End
End
End
Attribute VB_Name = "UserControl1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Event Click()
Event ValueAdd(v As Long, ss As String)
Dim Maxv As Long, vv As Long

Private Sub Label1_Click()
'RaiseEvent Click
End Sub

Private Sub UserControl_Initialize()
On Error Resume Next
lblColor.Left = 0
lblColor.Width = 0
Picture1.Top = 0
Picture1.Left = 0
Picture1.Width = UserControl.Width
Picture1.Height = UserControl.Height
lblMsg.Width = Picture1.Width
lblMsg.Left = 0
lblMsg = ""
lblColor = ""
lblMsg.Top = (Picture1.Height - lblMsg.Height) / 2 - 15
lblColor.Top = 0
lblColor.Height = Picture1.Height
End Sub

Public Property Let Caption(Caption As String)
lblMsg.Caption = Caption
End Property

Public Property Get Caption() As String
Caption = lblMsg.Caption
End Property

Public Property Let MaxValue(v As Long)
Maxv = v
End Property

Public Property Get MaxValue() As Long
MaxValue = Maxv
End Property

Public Property Let Value(v As Long)
vv = v
If Maxv = 0 Then Exit Property
lblColor.Width = (v / Maxv) * UserControl.Width
End Property

Public Property Get Value() As Long
Value = vv
End Property

Private Sub UserControl_Resize()
UserControl_Initialize
End Sub

Public Function ValueAdd(v As Long, Optional ss As String)
On Error Resume Next
vv = vv + v
If Maxv = 0 Then Exit Function
lblColor.Width = (vv / Maxv) * UserControl.Width
If IsMissing(ss) Then Exit Function
If ss = "" Then Exit Function
lblMsg.Caption = ss & " " & vv & "/" & Maxv & " ..."
End Function

热心网友 时间:2023-04-25 18:26

系统自带进度条控件,在控件栏右键→部件 然后选择 microsoft windows common controls 6.0
有个自带的进度条
你也可以用shape picture image等控件模拟进度条
也可以自己手动写一个进度条控件
不过个人觉得用picturebox和image 模拟进度条方便好看点,可以设置一个漂亮的图片

热心网友 时间:2023-04-25 18:27

如果想要好看的进度条,一是自己写,再就是下载一个进度条控件,网上有的

热心网友 时间:2023-04-25 18:27

VERSION 5.00
Begin VB.UserControl UserControl1
ClientHeight = 510
ClientLeft = 0
ClientTop = 0
ClientWidth = 8055
ScaleHeight = 510
ScaleWidth = 8055
Begin VB.PictureBox Picture1
BackColor = &H8000000E&
Height = 525
Left = 0
ScaleHeight = 465
ScaleWidth = 11115
TabIndex = 0
Top = 0
Width = 11175
Begin VB.Label lblMsg
Alignment = 2 'Center
BackColor = &H80000009&
BackStyle = 0 'Transparent
Caption = "进度条"
ForeColor = &H000000FF&
Height = 180
Left = 5160
TabIndex = 1
Top = 135
Width = 600
End
Begin VB.Label lblColor
BackColor = &H00C00000&
Caption = "Label1"
Height = 495
Left = 0
TabIndex = 2
Top = 0
Width = 3495
End
End
End
Attribute VB_Name = "UserControl1"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Event Click()
Event ValueAdd(v As Long, ss As String)
Dim Maxv As Long, vv As Long

Private Sub Label1_Click()
'RaiseEvent Click
End Sub

Private Sub UserControl_Initialize()
On Error Resume Next
lblColor.Left = 0
lblColor.Width = 0
Picture1.Top = 0
Picture1.Left = 0
Picture1.Width = UserControl.Width
Picture1.Height = UserControl.Height
lblMsg.Width = Picture1.Width
lblMsg.Left = 0
lblMsg = ""
lblColor = ""
lblMsg.Top = (Picture1.Height - lblMsg.Height) / 2 - 15
lblColor.Top = 0
lblColor.Height = Picture1.Height
End Sub

Public Property Let Caption(Caption As String)
lblMsg.Caption = Caption
End Property

Public Property Get Caption() As String
Caption = lblMsg.Caption
End Property

Public Property Let MaxValue(v As Long)
Maxv = v
End Property

Public Property Get MaxValue() As Long
MaxValue = Maxv
End Property

Public Property Let Value(v As Long)
vv = v
If Maxv = 0 Then Exit Property
lblColor.Width = (v / Maxv) * UserControl.Width
End Property

Public Property Get Value() As Long
Value = vv
End Property

Private Sub UserControl_Resize()
UserControl_Initialize
End Sub

Public Function ValueAdd(v As Long, Optional ss As String)
On Error Resume Next
vv = vv + v
If Maxv = 0 Then Exit Function
lblColor.Width = (vv / Maxv) * UserControl.Width
If IsMissing(ss) Then Exit Function
If ss = "" Then Exit Function
lblMsg.Caption = ss & " " & vv & "/" & Maxv & " ..."
End Function
声明声明:本网页内容为用户发布,旨在传播知识,不代表本网认同其观点,若有侵权等问题请及时与本网联系,我们将在第一时间删除处理。E-MAIL:11247931@qq.com
股骨头坏死手术方式 退订金没有收据了怎么办 泸州台湾通行证外地人补办时间 运动手表安全吗(运动手表对身体有害吗) 扫地机器人随机式和规划式的区别 茶怎么喝才正确 如何查找电线接头 炸鱼片的做法 如何制作炸鱼片 福建泉州哪里有织带厂在招工 Apple 苹果 MacBook Air 2014款-适用对象 VB中那个进度条的控件和输入IP的控件在哪里 或者下载地址 vb6.0中进度条的使用方法 自制碱面的做法,自制碱面怎么做好吃,自制碱面 休闲鞋可以用来跑步吗 NIKE板鞋适合跑步吗 记忆深处的冰棍,这篇短文主要写了什么?哪些是详写的?哪些是略写的? 回忆杀!好吃又便宜的冰棍回归了,如何做好回忆童年的童年冰棍? 高聚物改性沥青防水卷材对人体有害吗 自粘防水卷材,释放出的气味有毒吗?一般气味多久才会消失? 防水卷材(SBS)及沥青 挥发哪些有害物质,会对人体造成什么伤害? 怎么领赛季皮肤 英雄联盟手游黄金段位为什么不掉怎么领赛季皮肤 三星移动硬盘和西部数据移动硬盘哪个好 西部数据的移动硬盘能当硬盘用么 英雄联盟一个账号可以同时玩两个区吗 lol一个账号不能同事登录两个区了吗? 腾讯微博好友怎么找 我发了腾讯微博是不是所有的好友都看的到我发的微博。有些好友不是我收听者?如何添加好友为收听者 啊啊 请推荐个能够屏蔽广告的插件啊 chrome的 Chrome下的去广告插件哪个比较好 VB怎么设置进度条 VB 进度条组件是什么 请问VB高手们: PWM控制技术、矢量变换控制技术、直接转矩控制技术之间是什么关系 交流伺服电机直接转矩控制好还是矢量控制好 显卡hdgraphics5000上网课怎么样 用直接转矩控制电机,转速有超调吗? 发起订单和发起预单的区别 hd4570显卡怎么样 卖家自主发起订单有哪些优势? 如何在阿里巴巴订单 销售机会成功转化为订单后,需要进入其他系统或者线下发起订单有高人能支个招啊? 天猫超市如何发起子订单 我的手到了冬季就会开始脱皮,先是手指的指尖那一节,然后是手掌 那你皮 什么意思 C1驾驶证去那检啊? 当我按插线板(插电脑电源的那个)开关时,家里的电源就跳闸! 二尖瓣狭窄置换术手术费用是多少?风险高吗? 一般天然牧草的营养价值如何? 风湿类二尖瓣闭合不全,手术费用是多少