Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
|
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old October 22nd, 2008, 05:05 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default Need Help with the close(X) button.

Hi

I am wondering how can I make it so when a user clicks on the close(X)a message pops up asking them if they really want to quit?



 
Old October 22nd, 2008, 09:48 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

Assuming this is for a windows app, you can handle the Form.Closing event. Prompt the user then set e.Cancel (property of the CancelEventArgs type accordingly.

-Peter
compiledthoughts.com
 
Old October 22nd, 2008, 11:08 PM
Friend of Wrox
 
Join Date: Sep 2007
Posts: 169
Thanks: 7
Thanked 2 Times in 2 Posts
Default

Thanks, exactly what I was looking for.






Similar Threads
Thread Thread Starter Forum Replies Last Post
access close button Vince_421 Access VBA 3 February 14th, 2007 12:01 PM
trying to close browser in a button taliosfalcon ASP.NET 1.0 and 1.1 Basics 1 February 7th, 2005 12:11 AM
Close button removal canuck38 Access 4 July 16th, 2004 03:50 AM
Access Close Button stoneman Access 9 July 7th, 2004 02:53 PM
Newbie Close Button Metastockuser Access 1 June 13th, 2004 04:12 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.