Help: Switching between Forms

wdw

Active member
Joined
Dec 11, 2002
Messages
37
I want to switch between two child forms in a parent form.
when I open childform2, I disable childform1, but when I close childform2 I would like to enable childform1. I can switch between them, but I cant get it enabled anymore.

Please help me!!

wdw
 
Last edited by a moderator:
Do show a dialog modally (I think this is what you want to do) you use the ShowDialog method of the Form class:

Code:
blah = New Form2()
blah.ShowDialog(Me)
 
Thanks, I had already find that method, but it is not exactly what I want.

I want to do everything in a parentform and then showdialog does not work!!

hope youve got another solution
 
By "parent" form, you mean MDI form? Anyway, you might want to use an array of forms. When unloading any of them, a proc could be launched to see if theres still a form showing in the array, and if so enable it. A property like "ShowingOrder" for each form could come in handy here, to keep track of the form that was active before the current one. :)
 
Youll have to be a little less vague first.

We need to know what you want to do, why you want to do it, what youve already tried and why this didnt work (including errors).
 
Back
Top