Jump to content
Xtreme .Net Talk

Recommended Posts

Posted

Hey,

 

Having real trouble on my MDI application.

 

I create two window as follows

 


frmSChild objfrmSChild = new frmSChild();
objfrmSChild.MdiParent = this;
objfrmSChild.Show();

	
frmMChild objfrmMChild = new frmMChild();
objfrmMChild.MdiParent = this;
objfrmMChild.Show();

 

And I have tried to put in a way of having it tiled on startup, but I cant get it to work.

 

Ideally I want a form that I have created to perform this so that the form appears on startup and the user can choose the layout.

 

So later I have this to create an instance of the form Layout I already have.

 


public void Layout()
{
 frmLayout layout = new frmLayout();
 layout.ParentFormLayout = this;
 layout.ShowDialog();

 if (layout.DialogResult == DialogResult.OK)
 {
   this.LayoutMdi(MdiLayout.TileHorizontal);
 }
 if (layout.DialogResult == DialogResult.Cancel)
 {
   this.LayoutMdi(MdiLayout.TileVertical);
 }
}

 

But no matter where I place this method it doesnt seem to work.

 

Even if I add tiling straight after the first code I placed, not even an option just tiling horizontal it doesnt work. I can only do it from the Main Menu when clicking the TileHorizontal from the window tab.

 

Its driving me crazy!!!

 

Any help is greatly appreciated

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...