Solved

MDI form stays ontop but parent is still enabled

Posted on 2004-09-25
2
179 Views
Last Modified: 2010-05-02
I have a MDI form with a child MDI form being displayed by a SDI application.  I have the MDI form ontop of all other forms working fine, but the SDI is still active [enabled] and I don't want the user to be able to close it without closing the MDI form first.

I tried disabling the SDI form before showing the MDI form with the vbModal parameter, then enabling it after the .Show call, but vbModal doesn't seem to work with MDI forms - I've read that too.

How can I get the SDI form to become disabled when the MDI form is active, then get enabled after the user closes the MDI form?

Thanks.
0
Comment
Question by:halfondj
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
2 Comments
 
LVL 32

Accepted Solution

by:
Erick37 earned 250 total points
ID: 12151554
Have you tried this...

In the MDI code:

Sub MDIForm_Load
    'Disable the SDI here
    frmSDIForm.enabled = False
End Sub

Sub MDIForm_UnLoad
    'Enable the SDI here
    frmSDIForm.enabled = True
End Sub
0
 

Author Comment

by:halfondj
ID: 12151632
After confirming what you posted re:what I knew, I realized my problem.

Thanks.  All is now working!
0

Featured Post

[Webinar] How Hackers Steal Your Credentials

Do You Know How Hackers Steal Your Credentials? Join us and Skyport Systems to learn how hackers steal your credentials and why Active Directory must be secure to stop them. Thursday, July 13, 2017 10:00 A.M. PDT

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
Since upgrading to Office 2013 or higher installing the Smart Indenter addin will fail. This article will explain how to install it so it will work regardless of the Office version installed.
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…
Suggested Courses
Course of the Month4 days, 15 hours left to enroll

636 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question