📄 bfdownload.ctl
字号:
VERSION 5.00
Object = "{48E59290-9880-11CF-9754-00AA00C00908}#1.0#0"; "MSINET.OCX"
Object = "{831FDD16-0C5C-11D2-A9FC-0000F8754DA1}#2.0#0"; "mscomctl.ocx"
Object = "{F9043C88-F6F2-101A-A3C9-08002B2F49FB}#1.2#0"; "comdlg32.ocx"
Begin VB.UserControl BFDownLoad
ClientHeight = 810
ClientLeft = 0
ClientTop = 0
ClientWidth = 5925
ScaleHeight = 810
ScaleWidth = 5925
Begin MSComDlg.CommonDialog CDialog
Left = 4200
Top = 0
_ExtentX = 847
_ExtentY = 847
_Version = 393216
End
Begin InetCtlsObjects.Inet Ine
Left = 3360
Top = 0
_ExtentX = 1005
_ExtentY = 1005
_Version = 393216
End
Begin MSComctlLib.ProgressBar PBar
Height = 375
Left = 0
TabIndex = 0
Top = 0
Width = 3255
_ExtentX = 5741
_ExtentY = 661
_Version = 393216
Appearance = 1
Scrolling = 1
End
End
Attribute VB_Name = "BFDownLoad"
Attribute VB_GlobalNameSpace = False
Attribute VB_Creatable = True
Attribute VB_PredeclaredId = False
Attribute VB_Exposed = False
Option Explicit
'#Const 调试 = True
#Const 调试 = False
'缺省属性值:
Const m_def_综合信息 = ""
Const m_def_文件名 = ""
Const m_def_文件路径 = ""
Const m_def_文件主名 = ""
Const m_def_文件扩展名 = ""
Const m_def_文件类型 = ""
Const m_def_默认路径 = ""
Const m_def_缓冲字节 = 4096
Const m_def_下载地址 = ""
Const m_def_保存地址 = ""
Const m_def_字节总数 = 0
Const m_def_下载速度 = ""
Const m_def_读取字节 = 0
Const m_def_覆盖现有 = "询问"
Const m_def_剩余时间 = ""
Const m_def_下载进度 = ""
Const m_def_当前状态 = "空闲"
Const m_def_状态说明 = ""
'属性变量:
Dim m_综合信息 As String
Dim m_文件名 As String
Dim m_文件路径 As String
Dim m_文件主名 As String
Dim m_文件扩展名 As String
Dim m_文件类型 As String
Dim m_默认路径 As String
Dim m_缓冲字节 As Long
Dim m_下载地址 As String
Dim m_保存地址 As String
Dim m_字节总数 As Long
Dim m_下载速度 As String
Dim m_读取字节 As Long
Dim m_覆盖现有 As String
Dim m_剩余时间 As String
Dim m_下载进度 As String
Dim m_当前状态 As String
Dim m_状态说明 As String
'事件声明:
Event Click() 'MappingInfo=PBar,PBar,-1,Click
Attribute Click.VB_Description = "Click 事件"
Event DblClick()
Attribute DblClick.VB_Description = "当用户在一个对象上按下并释放鼠标按钮后再次按下并释放鼠标按钮时发生。"
Event MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single) 'MappingInfo=PBar,PBar,-1,MouseDown
Attribute MouseDown.VB_Description = "MouseDown 事件"
Event MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single) 'MappingInfo=PBar,PBar,-1,MouseMove
Attribute MouseMove.VB_Description = "MouseMove 事件"
Event MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single) 'MappingInfo=PBar,PBar,-1,MouseUp
Attribute MouseUp.VB_Description = "MouseUp 事件"
Event Resize() 'MappingInfo=UserControl,UserControl,-1,Resize
Attribute Resize.VB_Description = "当第一次显示一个窗体时或改变一个对象的大小时发生。"
Event 状态改变()
Dim 运行状态 As Boolean, 取消 As Boolean, 暂停 As Boolean, 下载时间 As Double, 累计时间 As Double, 开始时间 As Double, 开始日期 As Date
Dim 文件号 As Integer
'注意!不要删除或修改下列被注释的行!
'MappingInfo=PBar,PBar,-1,Orientation
Public Property Get Orientation() As OrientationConstants
Attribute Orientation.VB_Description = "返回/设置一个值,决定进度栏是水平还是垂直显示。"
Orientation = PBar.Orientation
End Property
Public Property Let Orientation(ByVal New_Orientation As OrientationConstants)
PBar.Orientation() = New_Orientation
PropertyChanged "Orientation"
End Property
'注意!不要删除或修改下列被注释的行!
'MappingInfo=PBar,PBar,-1,Scrolling
Public Property Get Scrolling() As ScrollingConstants
Attribute Scrolling.VB_Description = "返回/设置一个值,决定该控件显示进度时是使用标准的分段进度栏,还是使用平滑的进度栏。"
Scrolling = PBar.Scrolling
End Property
Public Property Let Scrolling(ByVal New_Scrolling As ScrollingConstants)
PBar.Scrolling() = New_Scrolling
PropertyChanged "Scrolling"
End Property
'注意!不要删除或修改下列被注释的行!
'MappingInfo=PBar,PBar,-1,Appearance
Public Property Get Appearance() As AppearanceConstants
Attribute Appearance.VB_Description = "返回/设置当控件、窗体、MDI窗体运行时,是否以 3D 效果显示。"
Appearance = PBar.Appearance
End Property
Public Property Let Appearance(ByVal New_Appearance As AppearanceConstants)
PBar.Appearance() = New_Appearance
PropertyChanged "Appearance"
End Property
'注意!不要删除或修改下列被注释的行!
'MappingInfo=PBar,PBar,-1,BorderStyle
Public Property Get BorderStyle() As BorderStyleConstants
Attribute BorderStyle.VB_Description = "返回/设置对象的边界样式。"
BorderStyle = PBar.BorderStyle
End Property
Public Property Let BorderStyle(ByVal New_BorderStyle As BorderStyleConstants)
PBar.BorderStyle() = New_BorderStyle
PropertyChanged "BorderStyle"
End Property
Private Sub PBar_Click()
RaiseEvent Click
End Sub
Private Sub PBar_MouseDown(Button As Integer, Shift As Integer, x As Single, y As Single)
RaiseEvent MouseDown(Button, Shift, x, y)
End Sub
Private Sub PBar_MouseMove(Button As Integer, Shift As Integer, x As Single, y As Single)
RaiseEvent MouseMove(Button, Shift, x, y)
End Sub
'注意!不要删除或修改下列被注释的行!
'MappingInfo=PBar,PBar,-1,MousePointer
Public Property Get MousePointer() As MousePointerConstants
Attribute MousePointer.VB_Description = "返回/设置当鼠标指针置于对象的一部分上时所显示的鼠标类型。"
MousePointer = PBar.MousePointer
End Property
Public Property Let MousePointer(ByVal New_MousePointer As MousePointerConstants)
PBar.MousePointer() = New_MousePointer
PropertyChanged "MousePointer"
End Property
Private Sub PBar_MouseUp(Button As Integer, Shift As Integer, x As Single, y As Single)
RaiseEvent MouseUp(Button, Shift, x, y)
End Sub
Private Sub UserControl_Resize()
On Error Resume Next
PBar.Width = UserControl.Width
PBar.Height = UserControl.Height
RaiseEvent Resize
End Sub
'注意!不要删除或修改下列被注释的行!
'MappingInfo=PBar,PBar,-1,ToolTipText
Public Property Get ToolTipText() As String
Attribute ToolTipText.VB_Description = "返回/设置当鼠标在控件上暂停时显示的文本。"
ToolTipText = PBar.ToolTipText
End Property
Public Property Let ToolTipText(ByVal New_ToolTipText As String)
PBar.ToolTipText() = New_ToolTipText
PropertyChanged "ToolTipText"
End Property
'注意!不要删除或修改下列被注释的行!
'MappingInfo=Ine,Ine,-1,UserName
Public Property Get UserName() As String
UserName = Ine.UserName
End Property
Public Property Let UserName(ByVal New_UserName As String)
Ine.UserName() = New_UserName
PropertyChanged "UserName"
End Property
'注意!不要删除或修改下列被注释的行!
'MappingInfo=Ine,Ine,-1,Password
Public Property Get Password() As String
Password = Ine.Password
End Property
Public Property Let Password(ByVal New_Password As String)
Ine.Password() = New_Password
PropertyChanged "Password"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,
Public Property Get 下载地址() As String
下载地址 = m_下载地址
End Property
Public Property Let 下载地址(ByVal New_下载地址 As String)
m_下载地址 = New_下载地址
PropertyChanged "下载地址"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,0,0,
Public Property Get 保存地址() As String
保存地址 = m_保存地址
End Property
Public Property Let 保存地址(ByVal New_保存地址 As String)
m_保存地址 = New_保存地址
PropertyChanged "保存地址"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=8,1,2,0
Public Property Get 字节总数() As Long
Attribute 字节总数.VB_MemberFlags = "400"
字节总数 = m_字节总数
End Property
Public Property Let 字节总数(ByVal New_字节总数 As Long)
If Ambient.UserMode = False Then Err.Raise 387
If Ambient.UserMode Then Err.Raise 382
m_字节总数 = New_字节总数
PropertyChanged "字节总数"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,1,2,0
Public Property Get 下载速度() As String
Attribute 下载速度.VB_MemberFlags = "400"
下载速度 = m_下载速度
End Property
Public Property Let 下载速度(ByVal New_下载速度 As String)
If Ambient.UserMode = False Then Err.Raise 387
If Ambient.UserMode Then Err.Raise 382
m_下载速度 = New_下载速度
PropertyChanged "下载速度"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=8,1,2,0
Public Property Get 读取字节() As Long
Attribute 读取字节.VB_MemberFlags = "400"
读取字节 = m_读取字节
End Property
Public Property Let 读取字节(ByVal New_读取字节 As Long)
If Ambient.UserMode = False Then Err.Raise 387
If Ambient.UserMode Then Err.Raise 382
m_读取字节 = New_读取字节
PropertyChanged "读取字节"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=0,0,0,false
Public Property Get 覆盖现有() As String
覆盖现有 = m_覆盖现有
End Property
Public Property Let 覆盖现有(ByVal New_覆盖现有 As String)
m_覆盖现有 = New_覆盖现有
PropertyChanged "覆盖现有"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=13,1,2,
Public Property Get 剩余时间() As String
Attribute 剩余时间.VB_MemberFlags = "400"
剩余时间 = m_剩余时间
End Property
Public Property Let 剩余时间(ByVal New_剩余时间 As String)
If Ambient.UserMode = False Then Err.Raise 387
If Ambient.UserMode Then Err.Raise 382
m_剩余时间 = New_剩余时间
PropertyChanged "剩余时间"
End Property
'注意!不要删除或修改下列被注释的行!
'MemberInfo=12,1,2,0
Public Property Get 下载进度() As String
Attribute 下载进度.VB_MemberFlags = "400"
下载进度 = m_下载进度
End Property
Public Property Let 下载进度(ByVal New_下载进度 As String)
If Ambient.UserMode = False Then Err.Raise 387
If Ambient.UserMode Then Err.Raise 382
m_下载进度 = New_下载进度
PropertyChanged "下载进度"
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -