How would I go about creating a loading screen or method that will load all my components and show the progress of loading through a progress bar. I would love to set something like this up for some of my larger form applications. I know how to do it with XNA to load all my content but forms applications I can't really seem to figure out.

I would suggest to define a Splash screen.
See here as an example.

Hope this helps

I disagree with the introduction in that article.

A good splash screen is quiet, simple, free of large graphics and "crayola box colours" and only shows itself if necessary.

I would say if your application takes less than 2 - 3 seconds to open the "Parent" form, there is no need to have a splash screen.

I would open the main form as quickly as possible and load everything else in the background so the user can immediately begin using the application instead of waiting for the splash screen to disappear and the main screen to start.

Another option is to start a timer on your load method, if the timer elapses 2 or 3 seconds and not everything is loaded...have the timer start a splash screen, that way the users with fast computers dont waste resources and time loading a loading screen...it would only show itself if it needed to.

Just my 2c worth :)

One simple way to keep track of which forms are loaded would be to have a call in their On_Load events to increment a variable in a static class. If you know the total number of forms to load, you can use this number to evaluate the percent loaded. Keep in mind though, this will only be a % of total forms loaded - if some forms take longer than others it will not be a % of time till the load is complete (hence the dreadful 99% complete you see on most progress bars).

Well my problem is, the program I'm developing is loading everything too slow for my comfort. When my parent form starts I have it as a menu that uses the Up, Down, and Return keys to navigate it. I've developed a bouncing text function that floats the selected menu item in any direction you want. It's sitting on a timer at 1ms but yet the float is moving at a rate of almost 150 - 200ms. I have a few high quality png background images sitting inside the resources folder that I use as backgrounds for a tab control. Just everything is loading too slowly. I want the application to run smoothly. It's size is at almost 11MB. It should only be around 5. But I've been developing test methods and everything inside this application then moving them to an application extension.

The Timer control can only really fire events at about a 25-50ms interval, so setting it to 1ms will do you no good. And if you are embedding hi-res images in the application there will really be no way to lower the overall size...

It might be a good idea to post some of the relevant code that you feel could use optimizing for us to help you with.

I want to say it's the high resolution images that's causing it to run slowly, that's why I included that little bit of information. Perhaps if I try reducing the quality to .gif? Then telling if that helps at all?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.