PC Review


Reply
Thread Tools Rate Thread

ControlBox's X vs me.close()

 
 
Wapiti
Guest
Posts: n/a
 
      31st Aug 2004
It appears to me that me.close() will completely kill the application, while
the controlbox's X button only hides the program. Is this correct?

If not, could I be possibly causing this behaviour inadvertantly?

If so, why? And how can I make it completely kill my program when the user
clicks the X?

Is there an unload type event, as we used to use in v6, that lets us know
the app is closing?

What event does one use to capture the user clicking the control box's X?


 
Reply With Quote
 
 
 
 
Ginny Caughey [MVP]
Guest
Posts: n/a
 
      31st Aug 2004
Wapiti,

This is a FAQ item because the behavior is so completely non-intuitive. If
you set your main form's MinimizeBox to false, the X will become OK and
clicking it will be the same as calling Close. Here's a link to the entire
FAQ:
http://msdn.microsoft.com/mobility/p...Q/default.aspx

--
Ginny Caughey
..Net Compact Framework MVP



"Wapiti" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> It appears to me that me.close() will completely kill the application,
> while
> the controlbox's X button only hides the program. Is this correct?
>
> If not, could I be possibly causing this behaviour inadvertantly?
>
> If so, why? And how can I make it completely kill my program when the
> user
> clicks the X?
>
> Is there an unload type event, as we used to use in v6, that lets us know
> the app is closing?
>
> What event does one use to capture the user clicking the control box's X?
>
>



 
Reply With Quote
 
Wapiti
Guest
Posts: n/a
 
      31st Aug 2004
Thanks Ginny, that did it. Now why didn't I think of using that method... ?
grin.

Mike


"Ginny Caughey [MVP]" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
> Wapiti,
>
> This is a FAQ item because the behavior is so completely non-intuitive. If
> you set your main form's MinimizeBox to false, the X will become OK and
> clicking it will be the same as calling Close. Here's a link to the entire
> FAQ:
>

http://msdn.microsoft.com/mobility/p...Q/default.aspx
>
> --
> Ginny Caughey
> .Net Compact Framework MVP
>
>
>
> "Wapiti" <(E-Mail Removed)> wrote in message
> news:(E-Mail Removed)...
> > It appears to me that me.close() will completely kill the application,
> > while
> > the controlbox's X button only hides the program. Is this correct?
> >
> > If not, could I be possibly causing this behaviour inadvertantly?
> >
> > If so, why? And how can I make it completely kill my program when the
> > user
> > clicks the X?
> >
> > Is there an unload type event, as we used to use in v6, that lets us

know
> > the app is closing?
> >
> > What event does one use to capture the user clicking the control box's

X?
> >
> >

>
>



 
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
The ControlBox doesn't display the Close (X) icon =?Utf-8?B?SmVhbm5pZQ==?= Microsoft Access 6 15th Jun 2006 11:21 PM
How can I turn off the ControlBox but still have Close in the upper right of a form? Michael Howes Microsoft Dot NET Framework Forms 4 1st Apr 2005 07:51 PM
How to: Use dialogbox to control close button on controlbox? =?Utf-8?B?Y2hhcmxpZXdlc3Q=?= Microsoft C# .NET 2 22nd Oct 2004 02:05 PM
What is the proper way to close a form without a controlbox =?Utf-8?B?QW1pbA==?= Microsoft Dot NET Framework Forms 5 16th Oct 2004 04:49 PM
Hiding a form's Close ControlBox button =?Utf-8?B?TGFuY2U=?= Microsoft VB .NET 2 2nd May 2004 04:16 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 10:56 AM.