Navigate between forms

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.
 
P

PvdG42

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().
 

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