VB.NET 进度条与状态条的使用
来源:互联网 发布:小米平板2windows 驱动 编辑:程序博客网 时间:2024/05/16 15:05
Private strDate = New System.Windows.Forms.StatusBarPanel
Private StrCount = New System.Windows.Forms.StatusBarPanel
Private info = New System.Windows.Forms.StatusBarPanel
Private progress = New System.Windows.Forms.StatusBarPanel
Private StatusBar As New ProgressStatus ''状态条中加入进度条
Private Sub InitializeStatusBar()Sub InitializeStatusBar()
info.Text = "Ready"
info.Width = 100
StrCount.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents
StrCount.Alignment = HorizontalAlignment.Center
StrCount.Text = "完成 0 条记录"
progress.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring
strDate.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents
strDate.Text = System.DateTime.Now
strDate.Alignment = HorizontalAlignment.Right
With StatusBar
.Panels.Add(info)
.Panels.Add(progress)
.Panels.Add(StrCount)
.Panels.Add(strDate)
.ShowPanels = True
.setProgressBar = 1
.progressBar.Minimum = 0
.progressBar.Maximum = 100
End With
Me.Controls.Add(StatusBar)
End Sub
Private StrCount = New System.Windows.Forms.StatusBarPanel
Private info = New System.Windows.Forms.StatusBarPanel
Private progress = New System.Windows.Forms.StatusBarPanel
Private StatusBar As New ProgressStatus ''状态条中加入进度条
Private Sub InitializeStatusBar()Sub InitializeStatusBar()
info.Text = "Ready"
info.Width = 100
StrCount.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents
StrCount.Alignment = HorizontalAlignment.Center
StrCount.Text = "完成 0 条记录"
progress.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Spring
strDate.AutoSize = System.Windows.Forms.StatusBarPanelAutoSize.Contents
strDate.Text = System.DateTime.Now
strDate.Alignment = HorizontalAlignment.Right
With StatusBar
.Panels.Add(info)
.Panels.Add(progress)
.Panels.Add(StrCount)
.Panels.Add(strDate)
.ShowPanels = True
.setProgressBar = 1
.progressBar.Minimum = 0
.progressBar.Maximum = 100
End With
Me.Controls.Add(StatusBar)
End Sub
组件类:ProgressStatus.vb
Public Class ProgressStatusClass ProgressStatus : Inherits StatusBar
Public progressBar As New progressBar
Private _progressBar As Integer = -1
Sub New()Sub New()
progressBar.Hide()
Me.Controls.Add(progressBar)
End Sub
Public Property setProgressBar()Property setProgressBar() As Integer
Get
Return _progressBar
End Get
Set(ByVal Value As Integer)
_progressBar = Value
Me.Panels(_progressBar).Style = StatusBarPanelStyle.OwnerDraw
End Set
End Property
Private Sub Reposition()Sub Reposition(ByVal sender As Object, ByVal sbdevent As System.Windows.Forms.StatusBarDrawItemEventArgs) Handles MyBase.DrawItem
progressBar.Location = New Point(sbdevent.Bounds.X, sbdevent.Bounds.Y)
progressBar.Size = New Size(sbdevent.Bounds.Width, sbdevent.Bounds.Height)
progressBar.Show()
End Sub
End Class
Public progressBar As New progressBar
Private _progressBar As Integer = -1
Sub New()Sub New()
progressBar.Hide()
Me.Controls.Add(progressBar)
End Sub
Public Property setProgressBar()Property setProgressBar() As Integer
Get
Return _progressBar
End Get
Set(ByVal Value As Integer)
_progressBar = Value
Me.Panels(_progressBar).Style = StatusBarPanelStyle.OwnerDraw
End Set
End Property
Private Sub Reposition()Sub Reposition(ByVal sender As Object, ByVal sbdevent As System.Windows.Forms.StatusBarDrawItemEventArgs) Handles MyBase.DrawItem
progressBar.Location = New Point(sbdevent.Bounds.X, sbdevent.Bounds.Y)
progressBar.Size = New Size(sbdevent.Bounds.Width, sbdevent.Bounds.Height)
progressBar.Show()
End Sub
End Class
- VB.NET 进度条与状态条的使用
- 进度条,状态条控件的使用
- VB.Net 使用FTPWebRequest下载进度条
- Delphi-->状态条中插入进度条的范例
- Android的进度条与拖动条
- MRProgress网易使用的进度条、刷新条
- [VB.NET]求救,treeview做的导航条代码(VB)
- 【VB.NET】浅谈VB与VB.NET的关系
- 【VB.NET视频】VB与VB.NET的区别
- vb.net DataGridViewCheckBox 状态
- vb.net与vb的比较
- vb与vb.net的不同
- VB与VB.NET的区别
- VB与VB.NET的区别
- VB与VB.net的区别
- vb.net与vb的区别
- VB进度条 游戏血条控件
- Asp.Net保存滚动条的状态
- VS2005 ASP.NET2.0安装项目的制作(包括数据库创建、站点创建、IIS属性修改、Web.Config文件修改)
- 如何调试驱动程序
- xml文件不释放的问题
- 利用Repeater控件显示主-从关系数据表
- Windows XP Embedded (XPE)开发工具、升级包、中文包等微软官方下载地址
- VB.NET 进度条与状态条的使用
- Company Code
- JSF通过EL读取List中的值
- VB.NET 中OpenFileDg文件名,路径的获取
- 2008年IT人士必去的10个网站
- VC++实现非窗口类中使用定时器的方法
- 过年回家真是难解决
- ATL多继承情况下接口的取得
- 高尔夫产业的发展