用STATUS BAR 显示进度

njstar 2003-03-31 10:46:12
sqldataadapter1.fill(dataset11)时,由于数据太大,想用STATUS BAR 显示进度,请问有什么方法?
...全文
64 8 打赏 收藏 转发到动态 举报
写回复
用AI写文章
8 条回复
切换为时间正序
请发表友善的回复…
发表回复
Angelnet 2003-04-03
  • 打赏
  • 举报
回复
gz
njstar 2003-04-03
  • 打赏
  • 举报
回复
结帐前再最后问一遍,真的没有办法发现FILL DATASET 的进度?
szch 2003-04-01
  • 打赏
  • 举报
回复
如果需要了解进度,可能需要自己编码了。
对DATAGRID 写个过程自行添加记录,每增加一行内容,PROGRESS BAR 值增加1
以前我用MSHFLEXGRID时,当用DATASOURSE时,无法知道读取进程。
于是只能用写了一个过程,自己增加内容。
VB。NET中不知有没有高手知道如何解决?
njstar 2003-04-01
  • 打赏
  • 举报
回复
谢谢帮忙,我知道如何用STATUS BAR 或PROGRESS BAR,但不清楚如何把STATUS BAR 或PROGRESS BAR 的进度与dataadapter.fill 的进度联系起来.
比如当FILL 到一半的时候,我希望STATUS BAR 或PROGRESS BAR 显示50%.
多谢
xumahua 2003-03-31
  • 打赏
  • 举报
回复
up
cfag 2003-03-31
  • 打赏
  • 举报
回复
用progressbar更方便,更直观
zhp80 2003-03-31
  • 打赏
  • 举报
回复
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
Dim x As New System.Windows.Forms.ProgressBar()
Dim i As Integer

x.Minimum = 0
x.Maximum = 1000
x.Dock = DockStyle.Fill

x.Parent = Me.StatusBar1
x.Show()

For i = 0 To 1000
x.Value = i
Next
x.Dispose()
End Sub
ganenpingsohucom 2003-03-31
  • 打赏
  • 举报
回复
给你一段代码,你可以自己在status bar上画进度条
Dim bounds As Drawing.Rectangle = DataGrid1.GetCellBounds(i, 3)
'DataGrid1.Controls.Item(j).SetBounds(bounds.X + xWidth, bounds.Y + xHeight, bounds.Width - xWidth * 2, bounds.Height - xHeight * 2)
Dim mbounds As New Drawing.Rectangle(bounds.X + xWidth, bounds.Y + xHeight, bounds.Width - xWidth * 2, bounds.Height - xHeight * 2)
Dim mybounds As New Drawing.Rectangle(bounds.X + xWidth, bounds.Y + xHeight, (bounds.Width - xWidth * 2) * DataGrid1.Item(i, 4) / 100, bounds.Height - xHeight * 2)
Dim pen As New Drawing.Pen(Color.DarkBlue)
e.Graphics.DrawRectangle(pen, mbounds)
e.Graphics.FillRectangle(Brushes.AliceBlue, mbounds)
' Dim brush As New Drawing.Drawing2D.HatchBrush(Drawing.Drawing2D.HatchStyle.DarkVertical, Color.Red)
e.Graphics.FillRectangle(Brushes.MidnightBlue, mybounds)

16,554

社区成员

发帖
与我相关
我的任务
社区描述
VB技术相关讨论,主要为经典vb,即VB6.0
社区管理员
  • VB.NET
  • 水哥阿乐
  • 无·法
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧