Board index » Visual Studio » MDI Container question

MDI Container question

Visual Studio298
Hey guys!!

I have an issue.

In my main form in my application I have reference to a form called actools

where I declare that the main form is its Parent form.

The line is like this

actools.MDIParent = ME



This line seems to work pretty well when the form is opened once. Once I

close it and reopen it again, it opens up by itself.

I don't know why, but it should keep being a child of the MDI parent main

form.

I have the line I mentioned above in the From Load area.

Any suggestion is greatly appreciated.



Thanks much.



Regards,



Teo


-
 

Re:MDI Container question



"Teo" <teofilo@homsany.net>kirjoitti viestissä

Quote
Hey guys!!

I have an issue.

In my main form in my application I have reference to a form called

actools where I declare that the main form is its Parent form.

The line is like this

actools.MDIParent = ME



This line seems to work pretty well when the form is opened once. Once I

close it and reopen it again, it opens up by itself.

I don't know why, but it should keep being a child of the MDI parent main

form.

I have the line I mentioned above in the From Load area.

Any suggestion is greatly appreciated.





How is the form showed again?



Is it possible to do like this:



actools.MDIParent = Me

actools.Show()



If MDIParent is set in Form's load method, the line should be:



Me.MDIParent = MainForm



-Teemu



-

Re:MDI Container question



"Teemu" <tsirkia@hotmail.com>kirjoitti viestissä





Quote
If MDIParent is set in Form's load method, the line should be:



Me.MDIParent = MainForm



And this line must be in acttool's Load method.



-Teemu



-

Re:MDI Container question

I added the parameter in the Menu item and that seems to do the trick for

me.



Thanks much guys!



Teo

"Teo" <teofilo@homsany.net>wrote in message

Quote
Hey guys!!

I have an issue.

In my main form in my application I have reference to a form called

actools where I declare that the main form is its Parent form.

The line is like this

actools.MDIParent = ME



This line seems to work pretty well when the form is opened once. Once I

close it and reopen it again, it opens up by itself.

I don't know why, but it should keep being a child of the MDI parent main

form.

I have the line I mentioned above in the From Load area.

Any suggestion is greatly appreciated.



Thanks much.



Regards,



Teo





-