473,397 Members | 1,961 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,397 software developers and data experts.

Form.ShowDialog() / ShowDialog(IWin32Window)

Hi !

Is there anybody who knows (if possible, by theory and practice)
what sense it makes
to hand over an owner to Form.ShowDialog ?

I cannot close/minimize the owning window while the dialog is in the popped
up state.
Hence, I don't understand what practical difference it makes handing over an
owner or not.

Your kind help would be appreciated.
Nov 15 '05 #1
2 10576
Hi,

The difference is that in the second case you tell the modal form who its
parent is. This, for example, enables the window manager to handle
activation correctly when you switch from and back to your application, and
allows for correct window hierarchy maintained by the system.

--
Dmitriy Lapshin [C# / .NET MVP]
X-Unity Test Studio
http://x-unity.miik.com.ua/teststudio.aspx
Bring the power of unit testing to VS .NET IDE

"peshrad" <pe*****@BieberGruppe.de> wrote in message
news:ul**************@TK2MSFTNGP09.phx.gbl...
Hi !

Is there anybody who knows (if possible, by theory and practice)
what sense it makes
to hand over an owner to Form.ShowDialog ?

I cannot close/minimize the owning window while the dialog is in the popped up state.
Hence, I don't understand what practical difference it makes handing over an owner or not.

Your kind help would be appreciated.


Nov 15 '05 #2
Hi,

This is a guess of a possible escenario where you could use it, what if a
child window of a MDI app show the dialog and it want that no other window
of the application can get focus?
if you use the ShowDialog () version I think that only the opener child is
invalidated, and if you want this dialog to be modal to the entire
application you should use the other version of ShowDialog.

Note,
I haven;t tested the above, it's just a logic explanation.

Cheers,

--
Ignacio Machin,
ignacio.machin AT dot.state.fl.us
Florida Department Of Transportation

"peshrad" <pe*****@BieberGruppe.de> wrote in message
news:ul**************@TK2MSFTNGP09.phx.gbl...
Hi !

Is there anybody who knows (if possible, by theory and practice)
what sense it makes
to hand over an owner to Form.ShowDialog ?

I cannot close/minimize the owning window while the dialog is in the popped up state.
Hence, I don't understand what practical difference it makes handing over an owner or not.

Your kind help would be appreciated.

Nov 15 '05 #3

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

Similar topics

3
by: carmen | last post by:
Is it possible to use ShowDialog with some parameters? How could I redefine this method? Thank you Carmen
5
by: The Real Andy | last post by:
Sorry if this question sounds stupid, its early days for me when it comes to c# and com interop. I have a method imported from Win Media PLayer SDK, IWMPPluginUI:DisplayPropertyPage, like so: ...
5
by: MrNobody | last post by:
I am using the no-arg ShowDialog() method hoping that the window would not be modal to any other window like the other ShowDialog(IWin32Window) method does, but when this opens it somehow becomes...
4
by: Michael C# | last post by:
I have a Windows Form I want to add to another form similar to the way you add an OpenFileDialog to a Windows Form from the Toolbox. Thx
0
by: Form Issues 101 | last post by:
Good Morning, I am currently running a program that I use here at work and I always get this error: OS=Microsoft Windows NT 5.1.2600.0 (.Net Framework=1.1.4322.2032) Software...
4
by: trialproduct2004 | last post by:
Hi all I am new to vb.net application. I am using showdialog property of form to display form. First time it is working properly. But next time it is giving me error that ' object reference not...
6
by: dbuchanan | last post by:
VS2005 I've been reading all the help I can on the topic (MSDN, other) but I can't make sense of this. Desired behavior; The user is to choose from the displayed list of the databound combobox...
8
by: hoofbeats95 | last post by:
I don't think this should be this complicated, but I can't figure it out. I've worked with C# for several years now, but in a web environment, not with windows form. I have a form with a query...
7
by: Pieter | last post by:
Hi, I have some generic module that handles exceptions. simply you call it like this: "LogManager.ErrorMessage(ex)". Worked great, until we now discovered that it isn't Thread-safe. What...
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: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.