Solved

MDI form stays ontop but parent is still enabled

Posted on 2004-09-25
2
172 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
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

How to improve team productivity

Quip adds documents, spreadsheets, and tasklists to your Slack experience
- Elevate ideas to Quip docs
- Share Quip docs in Slack
- Get notified of changes to your docs
- Available on iOS/Android/Desktop/Web
- Online/Offline

Join & Write a Comment

Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

757 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now