Results 1 to 3 of 3

Thread: MDIParent not showing Child Form correctly?

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    MDIParent not showing Child Form correctly?

    I have a MDIParent form that is showing a Child Form at the bottom left of the MDIParent. I've never seen this kind of behavior before. I never had any issues like this with VB.Net but I'm in the process of learning C#. Perhaps it's something that I'm not aware of related to C# but that would seem weird. It does this everytime. Anyway, please see the attached image. Below is the code that I click from a menustripitem.

    Code:
            private void employeeToolStripMenuItem_Click_1(object sender, EventArgs e)
            {
                Form1 frm1 = new Form1();
                frm1.MdiParent = this;
                frm1.StartPosition = FormStartPosition.Manual;
                frm1.Location = new System.Drawing.Point(0, 0); 
                frm1.Show();
            }
    Name:  BadForm.jpg
Views: 694
Size:  9.4 KB
    Blake

  2. #2
    Super Moderator jmcilhinney's Avatar
    Join Date
    May 2005
    Location
    Sydney, Australia
    Posts
    111,221

    Re: MDIParent not showing Child Form correctly?

    It looks like it's minimised, although I'm not sure why. Try setting the WindowState to Normal. If it's not minimised then it might be a sizing issue, so you could also try setting the Size. Again, not sure why that should be required, assuming that you have both those properties set appropriately in the designer for that form.
    Why is my data not saved to my database? | MSDN Data Walkthroughs
    VBForums Database Development FAQ
    My CodeBank Submissions: VB | C#
    My Blog: Data Among Multiple Forms (3 parts)
    Beginner Tutorials: VB | C# | SQL

  3. #3

    Thread Starter
    PowerPoster
    Join Date
    Jan 2004
    Location
    Southern California
    Posts
    5,034

    Re: MDIParent not showing Child Form correctly?

    I figured it out. I put the code in the "MdiChildActivate" method.
    Blake

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width