Newbie: Form Load Control Issues...

G

Guest

I have a very simple app that has one form (form1) and on the form is a
progressbar (progressbar1). My issue is when the app runs, the progress bar
beging updating before the complete form is loaded (i.e. I see the progress
bar fillin in, and the title bar of the form, but the rest of the form is not
loaded. What am I doing wrong? The progress bar is updated via a sub that
basically is nothing more that a counter loop.
This is driving me insane! Please cure my brain cramp!

Bruce
 
H

Herfried K. Wagner [MVP]

The VanDerbeck Group said:
I have a very simple app that has one form (form1) and on the form is a
progressbar (progressbar1). My issue is when the app runs, the progress
bar
beging updating before the complete form is loaded (i.e. I see the
progress
bar fillin in, and the title bar of the form, but the rest of the form is
not
loaded. What am I doing wrong? The progress bar is updated via a sub that
basically is nothing more that a counter loop.


Call 'Application.DoEvents' and the form's or control's 'Refresh' method
every nth iteration.
 
C

Cor Ligthert [MVP]

VanDerbeck.

The form is showed forever after the form load event.

It is not the best solution however setting a me.show in the form load event
when all form parts are done is something you can do. Be aware that if you
have by instance a datagrid on that form which is still loading, it looks
weird.

You can as well look at the event "form activated".
However be aware that this fires everytime it is activated and therefore you
have to set a kind of switch around this.

I hope this helps,

Cor
 
G

Guest

The application.DoEvents() seemed to work, however, I could not find the
'refresh' method i.e. form1.refresh()??
-ev-
 
C

Chris Dunaway

Is "form1" the name of your form instance? If so, the Refresh method
should be there.

You might go into your settings and check that "Hide Advanced Members"
is not checked under the VB section.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top