Help: Switching between Forms

wdw

Freshman
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 can't get it enabled anymore.

Please help me!!

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

Visual Basic:
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 you've 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 there's 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. :)
 
You'll have to be a little less vague first.

We need to know what you want to do, why you want to do it, what you've already tried and why this didn't work (including errors).
 
Back
Top