handling progress bar in vb.net

Posted by Thiru under VB.NET on 4/18/2012 | Points: 10 | Views : 5699 | Status : [Member] | Replies : 4
Hi Friends,
I have a status bar with progress bar in MDI Form
i like to activate progress bar when some process is going on in child form.

How to call / activate the progress bar in parent form From Child Form ?

regards,
Thiru.




Responses

Posted by: Sakthi.Singaravel on: 4/18/2012 [Member] Silver | Points: 25

Up
0
Down
Simple progress bar using method...

For Each filename In files 'files contains list of files

file_count += 1
ToolStripProgressBar1.Value += 1
ToolStripStatusLabel2.Text = file_count & "/" & files.Count
Next


Regards,
Singaravel M

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 4/18/2012 [Member] Starter | Points: 25

Up
0
Down
Thanks for your reply Singaravel,
i am lacking to handle/call ProgressBar in MDI form
From Child form.



Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Sunny4989 on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Step 1:

Open a Visual Basic project.
Double-click the "Progress Bar" control on the toolbar to add "ProgressBar1" to the form.
Double-click the "Button" control to add "Button1" to the form.

Step 2

Press "F7" to open the code window. Open the "Form1_Load" subroutine and type the following:
ProgressBar1.Minimum = 0
ProgressBar1.Maximum = 5
ProgressBar1.Value = 0

This code sets the starting values for the progress variable, as well as the minimum, maximum and current values for the progress bar. You can set a different maximum value depending on what you need the progress bar for.

Step 3:
Open the "Button1_Click" subroutine and type the following:

If ProgressBar1.Value < ProgressBar1.Maximum Then
ProgressBar1.Value += 1
If ProgressBar1.Value = ProgressBar1.Maximum Then
MsgBox("Finished!")
End If
End If


------------------------------------------------
Learn throughout life

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Posted by: Thiru on: 4/19/2012 [Member] Starter | Points: 25

Up
0
Down
Thanks for your reply,
Nice example code.
But i need to have the status bar with progress bar in mdi form
and control the same from child form

i dont know how to change the current form name in mdi statusbar.label and progress bar

help me in this regard please.

Thiru, if this helps please login to Mark As Answer. | Alert Moderator

Login to post response