Anybody Know how to make a custom loading screen?

Biohazard

Well-known member
Joined
Nov 23, 2009
Messages
52
Programming Experience
5-10
So I am nearning completion of my 7th major project
And I need the application to load files into ram when the application starts

Almost like a splash screen but with a loading bar.

I have to load over 90 JPG's
And I would like to have them in RAM so the application isn't so slow at first

IE

System.Load(My.Resources.JPG1) And LoadingBar1.Value += 10

Etc, etc.

I know this is the wrong code which is why I am posting

I have a Form I have created as a splash screen

I need it to load all the JPGs before starting the application

Any Ideas??

Thanks in advance as you guys have been so very helpful
And once I find a posting I can help with I will gladly share my 2 Cents
 
Its doubtfull that you will need to use all of these files and pictures immediately so instead of holding up the programs use until everything loads I would suggest using a background worker to load everything in a seperate thread during which the user wont see the delay.
 
The way how the application works it actually cycles through the images randomly on the fly almost like a video sequence, all images combined = to about 32MB so I personally think it would be best to just preload them when the splash screen shows
 
The holdup that your refering to with loading them all at first, isnt really that large at all if all 90 of them only amount to 32MB. You should use the background processor to load them, just make sure it knows which one its loading before the picture is actually called, that would make it seem like its already preloaded. So, when the picture its actually displaying show up, make it so the background processor knows which picture to load, then when it is its turn to display, its already in memory. Just a thought
 
Yea that is a great idea but I don't think it would work well with the way the application functions. You see it uses a system.random function to call fourth the next image, so if I implemented 2 system.randoms (one to call fourth the first then another to preload the next might cause repeat images constantly.) Thereof, I still feel preloading all of them is the best possible solution.

I just want the splash screen to load the images into memory and after every 3 it loads I want the progressbar to go up but 1 etc.

How can I do this without any issues, is it even possible?????????


Or is there a better methood to open all the images up

Thanks for all the suggestions and sorry if I sound rude I am not trying to
 
I have never done this, and havent worked with images since vb6, but, I would do something like make a loop that goes through the directory with the images in it, and created an array to store em
something like
for each i = 0 to system.fileinfo.count -1
bmpImage(i).file = system.fileinfo.index(i)
Next

Like I said, I dont know the details of actually how to load an image into memory, but I believe you would use the bitmap (or whatever file type it is) type, and assign the picture to that type. Then your random event would just pull a random bmpImage(). This is all theoretical as I have never done it, but that is the type of loop you would want to use, and I would store em all in an array.
 
Thanks Gompguru910 but I still can't figure it out I guess I will just let the first images glitch out no problem for me just a little irritating
 
Back
Top