skip to Main Content

I’m trying to implement some complement views inside my application and I would like to have a better layout control over them. I don’t know how to explain in words what my desired functionality is, so I made it through with some photoshop help, hoping you could give me a hand to implement it.

My application now looks like this:

(i need reputation to post images so.. sorry for the links)
http://i59.tinypic.com/2ikv8m1.jpg

When I minimize the modeless form which is focused in the previous image, I would like to be able to see it (and handle it to maximize or close) inside my main form as I show in the image below (made it in photoshop)

http://i58.tinypic.com/1e28go.jpg

Hope someone can lead my into a solution and thanks for the support.

EDIT: I need to be able to move that form outside my main form, even to a different monitor.

2

Answers


  1. If you don’t want to use the MDI approach, then set TopLevel of the modeless Form to false and add it to the main Forms Controls collection before showing it:

            Form frm = new Form();
            frm.TopLevel = false;
            this.Controls.Add(frm);
            frm.Show();
    

    *Obviously changing Form to the correct type of your modeless form.

    Login or Signup to reply.
  2. If i understand what you are trying to do, you want to minimize a certain form but still see it within your app (im assuming like Excel or Word)

    You can do something similar to what Idle_Mind said, but enclose both in a Form instead of the parent.

    Form fParent = new Form();
    fParent.Dock = DockMode.Fill;//i think this is the syntax. Use this if you want the form to fill to the screen
    Form fChild = new Form();
    fChild.TopLevel = false;
    fParent.Controls.Add(fChild);
    fChild.Show();

    Here, it should minimize to the lower left part of the parent form. You can then size the parent to whatever you want it to be.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search