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

Detecting a dialog

Is there any way for a Form to detect that it has a Modal dialog displayed
"above" it and to get hold of a reference with which to manipulate that
dialog?

I have a Windows Forms application that can display several dialogs
(custom Forms contained in an external assembly - all my own code).
I'd like to be able to shut the application down remotely (say, at lunch
time in our Development environment so that updates can be released).

While Closing the main form, is there any way that I can "get hold" of the
dialog in order to take "ask" it to take some "Cancel" or "Close" action?
I suppose I /could/ track down the Windows handle for the Close button
and send that a WM_Click message, but is there a more elegant way?

TIA,
Phill W.
Feb 27 '06 #1
1 1148
Phill,

There are probably hundreds of posibilities to create forms.

From that it depends if you can see an other form.

The most simple one is probably if there is an owner. Than you can using the
owner collection see the status of its childs.

Start it with
frm.owner = me

I hope this helps,

Cor

"Phill W." <p-***********@o-p-e-n.a-c.u-k> schreef in bericht
news:dt**********@yarrow.open.ac.uk...
Is there any way for a Form to detect that it has a Modal dialog displayed
"above" it and to get hold of a reference with which to manipulate that
dialog?

I have a Windows Forms application that can display several dialogs
(custom Forms contained in an external assembly - all my own code).
I'd like to be able to shut the application down remotely (say, at lunch
time in our Development environment so that updates can be released).

While Closing the main form, is there any way that I can "get hold" of the
dialog in order to take "ask" it to take some "Cancel" or "Close" action?
I suppose I /could/ track down the Windows handle for the Close button
and send that a WM_Click message, but is there a more elegant way?

TIA,
Phill W.

Feb 27 '06 #2

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

Similar topics

1
by: bill ramsay | last post by:
Dear all. I am using an existing hodge-podge of an application that runs on top of an Access database. This application dials up customer equipment, handshakes then downloads/uploads various...
13
by: dave yan | last post by:
hi, i have some forms which use javascript for data validation, e.g., checking to make sure all required fields are completed, checking that data falls within valid ranges for certain fields,...
8
by: Les Desser | last post by:
Is there any way to detect within A97 when Windows is trying to shut down, so I can close down the application gracefully? We currently have a trap in the main menu asking the user to confirm if...
2
by: Sam-Kiwi | last post by:
I've spent the last 6 months developing a pay-per-download website using ASP.NET Users purchase documents and then download them. The intention is that users are only charged for documents...
3
by: Chad Smith | last post by:
Hi, I have created a .NET deployment project in Visual Studio 2003. I have specified an entry point into my own code in this installer which launches into the familiar: public override void...
1
by: Dean Slindee | last post by:
In my application there is a main form with a tabcontrol. On each page in the tabcontrol is a panel upon which is painted a "sub" form. The main form acts as the "application host", while the...
2
by: Martin Robins | last post by:
Ok, I know this has been asked hundreds of times before (though for .net CF 1.0), but I want to detect when wired and/or wireless connections are made or broken from within the .net CF 2.0 (the...
1
by: joe | last post by:
Hello I am writing a script that uses xmlhttp.open, when i attempt to open a protected page I get the login prompt for my htpasswd. Is it possible to detect if there is a login requirement before...
4
by: Mugunth | last post by:
Is there anyway to detect whether the user has plugged in his headphones using C#? How?
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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.