E
eBob.com
I'd like my progress bar to increment by a minimal amount for each item
processed, so that it would increment steadily and gradually. As I read the
doc I think that the code below should do it. But what I get is that on the
second call to IncProgressBar a rather wide bar is drawn, maybe about 15
pixels, and then nothing happens until about the 30th call when another wide
bar is drawn. What am I doing wrong or misunderstanding? Thanks, Bob
Public Shared Sub AddProgressBar(ByVal uiform As Form1, ByRef si As
SiteRunOpts, ByVal numitems As Integer)
si.progbarProgress = New ProgressBar
With si.progbarProgress
.Width = numitems \ 2
.Maximum = numitems
.Location = New Point(progbarProgress_xloc, si.yloc)
.Step = 1
End With
uiform.Controls.Add(si.progbarProgress)
End Sub 'AddProgressBar
Public Shared Sub IncProgressBar(ByVal si As SiteRunOpts, ByVal val As
Integer)
si.progbarProgress.PerformStep()
End Sub
processed, so that it would increment steadily and gradually. As I read the
doc I think that the code below should do it. But what I get is that on the
second call to IncProgressBar a rather wide bar is drawn, maybe about 15
pixels, and then nothing happens until about the 30th call when another wide
bar is drawn. What am I doing wrong or misunderstanding? Thanks, Bob
Public Shared Sub AddProgressBar(ByVal uiform As Form1, ByRef si As
SiteRunOpts, ByVal numitems As Integer)
si.progbarProgress = New ProgressBar
With si.progbarProgress
.Width = numitems \ 2
.Maximum = numitems
.Location = New Point(progbarProgress_xloc, si.yloc)
.Step = 1
End With
uiform.Controls.Add(si.progbarProgress)
End Sub 'AddProgressBar
Public Shared Sub IncProgressBar(ByVal si As SiteRunOpts, ByVal val As
Integer)
si.progbarProgress.PerformStep()
End Sub