Results 1 to 2 of 2

Thread: MDIChild from MDIChild - Showing Maximized Issue

  1. #1

    Thread Starter
    PowerPoster
    Join Date
    Apr 2005
    Location
    Debug.Print
    Posts
    3,885

    MDIChild from MDIChild - Showing Maximized Issue

    Hi all,

    I have an MDIChild that I am showing in maximized view which is fine; however, when I click on a button on this maximized MDIChild, it is supposed to show another MDIChild (look-up screen) which should be showing in Normal state and CenterParent, but the problem I am having is that the MDIChild lookup screen is also showing in maximized state instead of normal state. I have attempted many things (like setting dock = none) and it doesn't make a difference. Any ideas?

    From the MainForm
    vb Code:
    1. Private Sub Accounting_BankReconciliation_Click(ByVal sender As System.Object, _
    2.                                                     ByVal e As System.EventArgs) Handles Accounting_BankReconciliation.Click
    3.  
    4.         Try
    5.             Dim LoadBankReconciliation As New BankReconciliation
    6.  
    7.             With LoadBankReconciliation
    8.                 .MdiParent = Me
    9.                 .Dock = DockStyle.Fill
    10.                 .Show()
    11.             End With
    12.         Catch ex As Exception
    13.             MessageBox.Show(ex.ToString(), _
    14.                             "Exception", _
    15.                             MessageBoxButtons.OK, _
    16.                             MessageBoxIcon.Error, _
    17.                             MessageBoxDefaultButton.Button1)
    18.         End Try
    19.     End Sub

    From the loaded MDIChild - to load the second MDIChild look-up form.
    vb Code:
    1. Private Sub SearchBankAccount_Click(ByVal sender As System.Object, _
    2.                                         ByVal e As System.EventArgs) Handles SearchBankAccount.Click
    3.  
    4.         Try
    5.             Dim LoadBankCodeLookup As New BankCodeLookup
    6.  
    7.  
    8.             With LoadBankCodeLookup
    9.                 .MdiParent = Me.MdiParent
    10.                 .Dock = DockStyle.None
    11.                 .TopMost = True
    12.                 .WindowState = FormWindowState.Normal
    13.                 .StartPosition = FormStartPosition.CenterParent
    14.                 .Show()
    15.             End With
    16.         Catch ex As Exception
    17.             MessageBox.Show(ex.ToString(), _
    18.                             "Exception", _
    19.                             MessageBoxButtons.OK, _
    20.                             MessageBoxIcon.Error, _
    21.                             MessageBoxDefaultButton.Button1)
    22.         End Try
    23.     End Sub

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

    Re: MDIChild from MDIChild - Showing Maximized Issue

    That's the way MDI works. You can't maximise just one child. Either they're all maximised or none of them are.
    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

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