Page Index Toggle Pages: 1 Send TopicPrint
Normal Topic STrange problem :-) (Read 1619 times)
Mark_Wills
YaBB Newbies
*
Offline


I love YaBB 1G - SP1!

Posts: 27
Joined: Mar 6th, 2006
STrange problem :-)
Mar 10th, 2006 at 12:23pm
Print Post  
Hmmm, this is strange...

I have the Flowchart control placed on an MDI parent form, docked, full size.

When my application opens a form (a child of the MDI form) the windows do not appear - I changed the size the Flowchart, and I see that the form is opening up BEHIND the flow chart!! Arrrgh!! Help! How do I get around that problem!

Thanks

Mark.
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: STrange problem :-)
Reply #1 - Mar 10th, 2006 at 2:08pm
Print Post  
Hi,

The same seems to happen if you place other controls in the MdiContainer, e.g. textboxes or buttons. Try putting the flowchart in a MDI child form - you could handle some events to keep the flowchart form behind the other MDI children.

I hope that helps,
Stoyan
  
Back to top
 
IP Logged
 
Stoyo
God Member
*****
Offline


MindFusion support

Posts: 13230
Joined: Jul 20th, 2005
Re: STrange problem :-)
Reply #2 - Mar 10th, 2006 at 2:28pm
Print Post  
The following seems to work, however with some flickering when the flowchart form is clicked:

public Form1()
{
  //
  // Required for Windows Form Designer support
  //
  InitializeComponent();

  //
  // TODO: Add any constructor code after InitializeComponent call
  //
  flow = new Form2();
  flow.Show();
  flow.MdiParent = this;
  flow.FormBorderStyle = FormBorderStyle.None;
  flow.Bounds = this.ClientRectangle;
}

Form2 flow;

private void Form1_Resize(object sender, System.EventArgs e)
{
  flow.Bounds = this.ClientRectangle;
}

private void Form1_Move(object sender, System.EventArgs e)
{
  flow.Bounds = this.ClientRectangle;
}

private void menuItem2_Click(object sender, System.EventArgs e)
{
  Form child = new Form();
  child.MdiParent = this;
  child.Show();
}

private void Form1_MdiChildActivate(object sender, System.EventArgs e)
{
  if (this.ActiveMdiChild is Form2)
  {
    foreach (Form f in this.MdiChildren)
     if (!(f is Form2))
       f.Activate();
  }
}

Form1 is the MDI container, and Form2 contains a docked flowchart.

Stoyan
  
Back to top
 
IP Logged
 
Page Index Toggle Pages: 1
Send TopicPrint