Navigate between forms

  • Thread starter Thread starter Sergio
  • Start date Start date
S

Sergio

what i need is to call a form2 from a form1, and i need to close the form1
before the form2 is open, right now i'm doing this:

me.close()

dim objForm2 as new frmForm2
objForm2.showdialog()

but it doen't work, it shows the form2 and don't closes the form1 until
the form2 is closed.
 
Sergio said:
what i need is to call a form2 from a form1, and i need to close the form1
before the form2 is open, right now i'm doing this:

me.close()

dim objForm2 as new frmForm2
objForm2.showdialog()

but it doen't work, it shows the form2 and don't closes the form1 until
the form2 is closed.


Of course not. That's design behavior of a modal form. Other program
operations are suspended until the modal dialog is excused. I'd try opening
the second form as a nonmodal (Show() vs. ShowDialog().
 
Back
Top