Hi Experts,
I am coming across a very weird problem while developing an MDI-based Windows Application on VS2008.
I have an MDI Form with menu bars and all. As Child Form I only have one form at a time. This is because, the Child form is not a document but a form with data entry fields.
Now when I open a child form for the first time, it is displayed okay. But when I close it and open it again, it's location automatically changes to a little up higher. Something like cascading is happening to the form I believe.
The weird part it, this cascading or offset effect occurs every alternate time the child form is opened!
I do follow the location and other properties, I shud give in this case:
ChildForm1.FormBorderStyle = None;
ChildForm1.StartPosition = Manual;
ChildForm1.WindowState = Maximized;
//before showing:
ChildForm1.Left = 0;
ChildForm1.Top = 0;
ChildForm1.Height = this.Height - myOffsetY;
ChildForm1.Width = this.Width - myOffsetX;
ChildForm1.Show();
Any suggestions or work around are greatly appreciated!
Thanks!
If the reply answers your question, please mark it as Answer, or Helpful, if it helped! Thanks!