Suspend user's envet when load form

G

Guest

The form has many controls, so it take some time to show it out. But before
the form finished showing, user can click the button on the form. Now, I want
to prevent any user's event before the form showe method finished. How to do
it?
 
F

FUnky

Disable all controls on the form at start of form_load event and enable them
at last.
 
J

Joanna Carter [TeamB]

"Napo" <[email protected]> a écrit dans le message de (e-mail address removed)...

| The form has many controls, so it take some time to show it out. But
before
| the form finished showing, user can click the button on the form. Now, I
want
| to prevent any user's event before the form showe method finished. How to
do
| it?

Move the code that links up the event handlers to the events so that the
hookups happen after the form is finished loading ?

Joanna
 
S

Stoitcho Goutsev \(100\)

Napo,

You can set form's Enabled to *false* this way the user cannot interact with
the form.

Do you actually have such a problem. Normally the form loading is a single
method call and unless it calls Application.DoEvents the application should
be iresponsive for the time of laoding; it is even not visible yet on the
screen.
But before
the form finished showing, user can click the button on the form.

How can the user click on a button if the form is not shown yet on the
screen?
 
G

Guest

the form had showed , but not finished loading.
At that time, user can click button..
For some reason, we called Application.DoEvents.
so, if we set form's enable as "true" after loading . the form will fresh.
I don't want to fresh it.
 

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