PC Review


Reply
Thread Tools Rate Thread

closing form, and all modals on top of it

 
 
CBanu [IXIA]
Guest
Posts: n/a
 
      5th Dec 2006
Hi,

I have an application that connects to a server. The server might send
an event that should cause my app to go offline. However, the user
could have at that particular moment a wizard (in the form of a modal
dialog), which also could have other modals or message boxes on top of
it. When I receive the event, I want to be able to close the wizard
along with all its modal 'children'.

There was a solution, in having the modals listen for a particular
event, and close when they received it. However, as I said, I could be
using message boxes also. So I can't have those listening for the
event.

I need something like running through the forms of my app, and see if
they're on top of the given form. Then call Close() if that's the case.

I'm looking forward for your feedback.

Thanks in advance,
Cosmin.

 
Reply With Quote
 
 
 
 
David Wier
Guest
Posts: n/a
 
      5th Dec 2006
Try:
Dim f As Form
For Each f In Me.MDIChildren
f.Close()
Next

--
David Wier
MVP/ASPInsider
http://aspnet101.com
http://aspexpress.com


"CBanu [IXIA]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Hi,
>
> I have an application that connects to a server. The server might send
> an event that should cause my app to go offline. However, the user
> could have at that particular moment a wizard (in the form of a modal
> dialog), which also could have other modals or message boxes on top of
> it. When I receive the event, I want to be able to close the wizard
> along with all its modal 'children'.
>
> There was a solution, in having the modals listen for a particular
> event, and close when they received it. However, as I said, I could be
> using message boxes also. So I can't have those listening for the
> event.
>
> I need something like running through the forms of my app, and see if
> they're on top of the given form. Then call Close() if that's the case.
>
> I'm looking forward for your feedback.
>
> Thanks in advance,
> Cosmin.
>




 
Reply With Quote
 
CBanu [IXIA]
Guest
Posts: n/a
 
      6th Dec 2006
I'm not using the Multiple Document Interface (MDI). Here is a
suggestion that could work, but I can't reproduce it so far:

http://forums.microsoft.com/MSDN/Sho...iteID=1&mode=1

David Wier wrote:
> Try:
> Dim f As Form
> For Each f In Me.MDIChildren
> f.Close()
> Next
>
> --
> David Wier
> MVP/ASPInsider
> http://aspnet101.com
> http://aspexpress.com
>
>
> "CBanu [IXIA]" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > Hi,
> >
> > I have an application that connects to a server. The server might send
> > an event that should cause my app to go offline. However, the user
> > could have at that particular moment a wizard (in the form of a modal
> > dialog), which also could have other modals or message boxes on top of
> > it. When I receive the event, I want to be able to close the wizard
> > along with all its modal 'children'.
> >
> > There was a solution, in having the modals listen for a particular
> > event, and close when they received it. However, as I said, I could be
> > using message boxes also. So I can't have those listening for the
> > event.
> >
> > I need something like running through the forms of my app, and see if
> > they're on top of the given form. Then call Close() if that's the case.
> >
> > I'm looking forward for your feedback.
> >
> > Thanks in advance,
> > Cosmin.
> >


 
Reply With Quote
 
 
 
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Showing form , closing login form but not closing app, how Bob Microsoft VB .NET 3 21st Dec 2005 07:54 PM
Closing event in a MID Child form I don't know if the child form is closing or the main form is closing **Developer** Microsoft C# .NET 1 19th Oct 2005 04:51 PM
Stopping a form from closing in its Closing hander Tom Jones Microsoft Dot NET Framework Forms 2 26th Aug 2004 01:24 PM
Multiple OutputTo (Called on Closing Form) Fails on Closing Database John Andrews Microsoft Access Macros 3 21st May 2004 08:54 AM
Modals Ruslan Shlain Microsoft VB .NET 3 30th Oct 2003 09:28 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 04:44 AM.