• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 9382
  • Last Modified:

Show progress of a loading form in vb.net

Hi all,
I would like to know how can I create a progress bar that will show the progress of a loading form in vb.net?

I have a form with lots of procedures running while it loads, I don't have a way to know the progress of the loading progress.

Thanks in advance!
2 Solutions
Jorge PaulinoIT Pro/DeveloperCommented:
You can add a frmStartupthat you use to the launch process. Then on the main form open the frmStartup

Dim frm As New frmStartup
frm.myProgressBar.Maximum = 100
frm.myProgressBar.Minimum = 0
frm.myProgressBar.Value = 0

After this just add some values to your progressbar between your process and close it in the end of the routine.
nahumbaAuthor Commented:
Hi jpaulino, the problem is that I don't know which values to add to the progress bar, it's something that depends on the user machine's performance (I hope you know what I mean).

So how can I get the progress bar to continue progressing correctly if I don't know which values to put between 0 and 100?

It has to be something more low - level I think..

Thanks again,
Bob LearnedCommented:
Are you looking to setup the progress as Style=Marquee?

The 14th Annual Expert Award Winners

The results are in! Meet the top members of our 2017 Expert Awards. Congratulations to all who qualified!

nahumbaAuthor Commented:
Hi Bob,
What do you mean Marquee? Do you mean a progress bar with "unknown" progress status?

If this what you mean then - Yes, this could be a good solution.

How do I set it?
Bob LearnedCommented:
When you set the Style property to Marquee, and call the Update method, then ProgressBar control will show a continuous progress until you are done.  This is just to show progress for an indeterminate process, like downloading a file of unknown size.

nahumbaAuthor Commented:
Thank you Bob!

Just one small question... If I use a progress bar on a status strip, and set the progress bar style to Marquee, then right after the form loads, the animation is started. How can I control the animation (i.e., tell it when to start and when to stop)?

Mike TomlinsonMiddle School Assistant TeacherCommented:
It starts as soon as you set it to Marquee.

To stop it, set it back to the default Style of "Blocks".
nahumbaAuthor Commented:
Yep - I've noticed that.

Thank you!
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: SQL Server Core 2016

This course will introduce you to SQL Server Core 2016, as well as teach you about SSMS, data tools, installation, server configuration, using Management Studio, and writing and executing queries.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now