By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,064 Members | 1,524 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,064 IT Pros & Developers. It's quick & easy.

Progress bar like a dialog box ?

P: n/a
as the form process some cacluation , How can I show the progress bar in a
daliog box (prompt out )??
as the process is completed, the dailog box will be closed .
Will it make the program slow ??
thanks
Nov 21 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
You can just create a Form with a Progress bar on it. Create a public
property on it so you can call it from the first form and reference it
accordingly - calling ShowDialog(); Probably better off using events if
possible.

In and of itself it won't make your program slow but it all depends on how
you code it.

--
W.G. Ryan MVP Windows - Embedded

Have an opinion on the effectiveness of Microsoft Embedded newsgroups?
Let Microsoft know!
https://www.windowsembeddedeval.com/...ity/newsgroups
"Agnes" <ag***@dynamictech.com.hk> wrote in message
news:eu**************@tk2msftngp13.phx.gbl...
as the form process some cacluation , How can I show the progress bar in a
daliog box (prompt out )??
as the process is completed, the dailog box will be closed .
Will it make the program slow ??
thanks

Nov 21 '05 #2

P: n/a
* "Agnes" <ag***@dynamictech.com.hk> scripsit:
as the form process some cacluation , How can I show the progress bar in a
daliog box (prompt out )??
as the process is completed, the dailog box will be closed .


Progress Dialog (for C#, can be converted to VB.NET):

<URL:http://www.codeproject.com/cs/miscctrl/progressdialog.asp>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3

P: n/a
Agnes,

I saw this question a lot of times before and thought why are the answers
always that difficult, I made a simple sample bellow. You have to make that
form2 of course to your shape, it is as simple as possible.

I hope this helps?

Cor

\\\2 forms with a progressbar on form2
Private frm As New Form2
Private Sub Form1_Load(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles MyBase.Load
Me.Timer1 = New Timer(components)
Me.Timer1.Enabled = True
Me.Timer1.Interval = 1000
Me.frm.Show()
frm.ProgressBar1.Maximum = 100
frm.ProgressBar1.Step = 25
End Sub
Private Sub Timer1_Tick(ByVal sender As Object, _
ByVal e As System.EventArgs) Handles Timer1.Tick
frm.Refresh()
frm.ProgressBar1.PerformStep()
frm.BringToFront()
If frm.ProgressBar1.Value > 99 Then
Timer1.Enabled = False
MessageBox.Show("I am there")
frm.Close()
End If
End Sub
///
Nov 21 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.