Suspend user's envet when load form

  • Thread starter Thread starter Guest
  • Start date Start date
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?
 
"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
 
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?
 
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.
 
Back
Top