CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2010
    Posts
    50

    Question How to Load MDI Chiled Form Modally?

    How to Load Form modally when working in MDI Form? Just for the User not to get control of other Forms before completing the task given in loaded Form.

    best regards,


    erncd

  2. #2
    Join Date
    Jul 2001
    Location
    Sunny South Africa
    Posts
    11,283

    Re: How to Load MDI Chiled Form Modally?

    MDI child windows cannot be shown modally by doing this :

    Code:
    Form1.Show vbModal
    You'll have to use some sort of logic in perhaps the Activated / deactivated events

  3. #3
    Join Date
    Jul 2006
    Location
    Germany
    Posts
    3,725

    Re: How to Load MDI Chiled Form Modally?

    This has been already mentioned multiple times:
    A modal MDI child window would be a contradiction in terms. An MDI child is always meant to be a window which is a sibling to other child windows with equal rights. It cannot be shown modal.

    However if you need to show a modal window, you can always add a normal Form to your project and show it modal at any time. You can compute the starting position from your MDI parent window to be sure the modal window appears at the position you want it to be.

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

Featured