Does this happen to everybody or just me?
Hey everybody, when I start any application no matter how big or small, the start up form usually loads weird. I have a sorta-kinda-fast enough computer, but when I click on .exe the controls and a few images load one after another - I mean it only takes a portion of a second to load, but still I could see how they appear on a form. Does this happen to everybody? or is there a way to make the form load in the background and then show everything - the form with controls on it (at once) to the user?
P.S.: If what I said doesn't make sense, then I just probably have a slow computer :(
Thanks,
jonwondering
Re: Does this happen to everybody or just me?
on load me.hide
do stuff
me.show
Re: Does this happen to everybody or just me?
OK I'll try that.
P.S.: Whoops, didn't see that post:
http://vbforums.com/showthread.php?t=345200
Re: Does this happen to everybody or just me?
What if I don't even have anything in Form1.Load() event?
Re: Does this happen to everybody or just me?
The Load event is raised before the form becomes visible anyway, so there is no point hiding the form in the Load event handler. The Activated event is raised when the form becomes visible.
Re: Does this happen to everybody or just me?
So there's no way to speed up the form loading?
Re: Does this happen to everybody or just me?
What is your procecssor speed and RAM size?
How many controls do you have on your form?
What does your form do?
Re: Does this happen to everybody or just me?
I have a 700 mhz PIII machine that I have VB Express on, I find it interesting to see what is drawn in what order in VB and out of it.
Like when I minimize the IDE and max it again, the sidebar appears first then the top.
:)
Re: Does this happen to everybody or just me?
Haha, thats funny Kal_Torak.
RobDog888,
I am running 1.4GHz Pentium M, 512MB RAM, XP Home
The startup form is the wizard, so it has a little image on it and a tabcontrol.
It does not do anything, but wait for the user to click Next.
Thanks.
Re: Does this happen to everybody or just me?
Since its the startup form the form isnt pre-initialized so to speak. If you create a Module with a sub Main and set that as the startup
and declare a public var for your form as New form1. When you do the application.run(oForm) it may help.
Re: Does this happen to everybody or just me?
OK, I'll try that. Thanks :)
Re: Does this happen to everybody or just me?
Most people usually use this way instead of using a global form from sub Main...
Application.Run(new Form1)
Re: Does this happen to everybody or just me?
By saying "startup" form I actually didnt make myself perfectly clear. That wizard form is not the main form. It is actually started from another form that is always invisible. By saying "startup", I meant that it is the first form the user sees when he/she runs the program (for the first time). But I don't know about Application.Run() because I use DialogResult to determine if the wizard was successful or got canceled...
Re: Does this happen to everybody or just me?
where are those images being loaded FROM. are they grabbed off your hard-drive, off the internet somewhere, off a network share? that could have a LOT to do with the speed of the images' load time.
Re: Does this happen to everybody or just me?
I wish that was the problem, but those images are all embedded into the exe.
Re: Does this happen to everybody or just me?
Like I said before, it's not that much of a deal - the "load" time only takes a portion of a second, but looking at other exe's with wizards and forms much more complex than mine, their forms/controls are shown instantly... :(
Re: Does this happen to everybody or just me?
Is the image(s) being loaded into the control from a directory file or a resource file?
Re: Does this happen to everybody or just me?
It's a picture box, so I assumed they are embedded.
Re: Does this happen to everybody or just me?
Ok, but how are you loading the image? In the property window and browsed and selected an image? Or through code
using the .Image property and .FromFile("C:\Somepath\somepicture.jpg") ?
Re: Does this happen to everybody or just me?
Property window, browsed and selected an image.
Re: Does this happen to everybody or just me?
Then its embedded. If it was being loaed from a file then that may be part of the issue, but guess not. Is it a large image/picturebox?
Re: Does this happen to everybody or just me?
Its 173 * 211 pixels, so it's not huge and the form is not that big, but still for some reason the form acts kinda weird. Maybe it's just my slow computer... :(
Thanks for your help anyway :)