Results 1 to 4 of 4

Thread: How to Make vbModal work in MDI

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    74

    How to Make vbModal work in MDI

    Hi everyone,

    I have a project that require a MDI program "HRMain", which run a MDI Child "frmMain" to input data, within this "frmMain", another MDI Child "frmNewClient" will be display so that user will make a major decision. Then difference process will be perform in "frmMain" based on this major decision.

    But now, vbModal is not working because "frmNewClient" is a MDI Child so that the program is not functioning accordingly.

    I wonder anyone can help me to resolve this problem, please.


  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758

    Re: How to Make vbModal work in MDI

    Well, the obvious question. Why is frmNewClient an MDIChild? Is it used for other purposes as well.

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Mar 2006
    Posts
    74

    Re: How to Make vbModal work in MDI

    bruce,

    It is because the end user want to "minimize" the program, and it is not running MDI at the beginning.

  4. #4
    I'm about to be a PowerPoster! Joacim Andersson's Avatar
    Join Date
    Jan 1999
    Location
    Sweden
    Posts
    14,649

    Re: How to Make vbModal work in MDI

    An MDI child form can not be shown modally. Also if a modal form is shown you're not suppose to be able to access the owner form until the modal form is closed. So saying that you both want a modal form and still be able to directly access the owner form so you can minimize it is a contradiction in terms.

    I would suggest that you make sure this form is not an MDI-child so you can show it modal, while still having the minimize button on this particular Form. In the Resize event simply check if the WindowState has been set to vbMinimized and in that case also minimize the owner Form. That way the whole application can still be minimized while the modal form is shown.

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