Link to home
Start Free TrialLog in
Avatar of Vlad77
Vlad77

asked on

Enable/Disable Forms

I have a situation:
I am opening a form(FormA) ,and without closing it ,I want to open another form (FormB).
And until I not finished with FormB ,I can't return to
FormA.(Disable to set focus on it)
I am writing:

   FormA.Show
      .
      .
      .
   FormB.Show
   FormA.Enable=False (On Loading FormB)
      .
      .
 
   FormA.Enable=True (On Unloading FormB)
And its' working .
But if I have a main MDIForm it's
not working like I want (when I click on FormA ,VB set
focus on it)
What can I do ,that it will work like without MDI form ?  

Avatar of rspahitz
rspahitz
Flag of United States of America image

You can make the shown form modal to prevent access to the calling form until the called form finishes:

'Form1
Form2.Show vbModal
' more code that won't get executed until Form2 unloads...
ASKER CERTIFIED SOLUTION
Avatar of PaulHews
PaulHews
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial