471,612 Members | 1,381 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

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

How to close a mon-modal window

Hi all,

I have a windows application in which I open a non-modal window on
click of button.
I want to close that window in case of an event raised on my
application.
This non-modal window is in different assembly than the assembly in
which the MDI form is.

So if there is a way to get a collection of instances of all the open
windows of the application then only the problem can be solved

Kindly help
Warm Regards
Sumit Vohra

Jan 13 '06 #1
1 1654
Sumit wrote:
I have a windows application in which I open a non-modal window on
click of button.
I want to close that window in case of an event raised on my
application.
This non-modal window is in different assembly than the assembly in
which the MDI form is.

So if there is a way to get a collection of instances of all the open
windows of the application then only the problem can be solved


Why not just keep a reference to the window you open (or a list of
references if there could be several)? Subscribe to the window's Closed
event so you don't try to close it if it's already been closed, and
then when you need to close it, you'll know what to close.

Being in a different assembly shouldn't make any difference.

Jon

Jan 13 '06 #2

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

14 posts views Thread by IanW | last post: by
7 posts views Thread by Sven Schwyn | last post: by
2 posts views Thread by Jason Huang | last post: by
14 posts views Thread by =?Utf-8?B?TWlrZVo=?= | last post: by
44 posts views Thread by bg_ie | last post: by
1 post views Thread by XIAOLAOHU | last post: by
reply views Thread by leo001 | last post: by
reply views Thread by MichaelMortimer | last post: by

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.