473,394 Members | 1,946 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,394 software developers and data experts.

Modal forms in an MDI

I have a burning desire (need) to dislay either modal
forms or something equivalent within an MDI based
application...

Except I can't! I can use ShowDialog() but the form being
shown cannot have an MDIParent.

I thought, ok, I'll implement it myself... only I can't
work out how the hell I could do it...

I want to achieve the following:

Sub X()

... do some stuff ..
ChildForm.ShowDialog()
... do some more stuff

End Sub

Only I can't use the ShowDialog function so I need to do:

Sub X()

... do some stuff ..
ChildForm.Show()
Stop processing here, let the thread get on with something
else until the ChildForm is Closed
... do some more stuff

End Sub

Now the best anyone's come up with so far is to put a
DoEvents loop in there waiting for the child to be closed
except of course this will burn 100% CPU until the child
is closed. And this is something that always annoys me
about Access cos it does this.

This can't be a new requirement! How does the ShowDialog
work? It must be really quite cunning.. how can I achieve
the same thing?

Thanks in advance
gwyn
Jul 21 '05 #1
1 1506
Hi Gwyn,

I am not a DotNet guru. However, I was not aware that in Win32 a modal
dialog could have the WS_CHILD style. When a modal dialog is created and
displayed, all of the app's top level windows except the dialog are disabled
by the system. If a modal dialog had a parent, the parent and thus the
dialog would be disabled.

-Roger

"Gwyn" <an*******@discussions.microsoft.com> wrote in message
news:00****************************@phx.gbl...
I have a burning desire (need) to dislay either modal
forms or something equivalent within an MDI based
application...

Except I can't! I can use ShowDialog() but the form being
shown cannot have an MDIParent.

I thought, ok, I'll implement it myself... only I can't
work out how the hell I could do it...

I want to achieve the following:

Sub X()

.. do some stuff ..
ChildForm.ShowDialog()
.. do some more stuff

End Sub

Only I can't use the ShowDialog function so I need to do:

Sub X()

.. do some stuff ..
ChildForm.Show()
Stop processing here, let the thread get on with something
else until the ChildForm is Closed
.. do some more stuff

End Sub

Now the best anyone's come up with so far is to put a
DoEvents loop in there waiting for the child to be closed
except of course this will burn 100% CPU until the child
is closed. And this is something that always annoys me
about Access cos it does this.

This can't be a new requirement! How does the ShowDialog
work? It must be really quite cunning.. how can I achieve
the same thing?

Thanks in advance
gwyn

Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: cassidyc | last post by:
Hi, I was wondering if anyone has come accross this issue? And if they have any solutions I have that can create new copies of itself Form1 as = new form1(); af.show(); This form can also...
8
by: Stephen Rice | last post by:
Hi, I have a periodic problem which I am having a real time trying to sort. Background: An MDI VB app with a DB on SQL 2000. I have wrapped all the DB access into an object which spawns a...
2
by: Mike | last post by:
Hi, I'm having a problem with modal forms on windows. I've written a very short test program, with a main window and a form called from the main window. The form is set to modal with...
2
by: diogenes | last post by:
I have created many shortcut/popup (aka context, or right-click) menus for my application - instead of toolbars or standard drop-down menus. Within my custom menu, I am using...
4
by: =?Utf-8?B?Z2luYWNyZXNzZQ==?= | last post by:
I am trying to close/dispose multiple instances of a form but because they are modal and hidden, they do not show up in My.Application.OpenForms. They must be modal, so making them modeless is not...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.