Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
|
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 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 August 9th, 2006, 02:14 PM
Authorized User
 
Join Date: Feb 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to MAKO
Default Hoy to use messagebox result

Hi pro's!

I need an example of how I can use messagebox result from user. In other words, if for x reason I need my program to carry out certain instructions depending on wether the user clics the OK or Cancel buttons on the shown messagebox, how can I do that?

please help!



MAKO - "El super simio"
__________________
MAKO - \"El super simio\"
 
Old August 9th, 2006, 04:11 PM
2V. 2V. is offline
Authorized User
 
Join Date: Aug 2006
Posts: 11
Thanks: 0
Thanked 0 Times in 0 Posts
Default

            if (DialogResult.OK = MessageBox.Show("text", "caption", MessageBoxButtons.OKCancel))
                //do something
             else
                //do something else

 
Old August 10th, 2006, 07:48 AM
Authorized User
 
Join Date: Feb 2006
Posts: 47
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via MSN to MAKO
Default

Thanks a lot 2V.!

MAKO - "El super simio"





Similar Threads
Thread Thread Starter Forum Replies Last Post
GridView and SQL More than one result = one result DarkForce ASP.NET 2.0 Basics 0 July 20th, 2007 04:29 AM
MessageBox Lalit Pradhan ASP.NET 2.0 Professional 1 July 5th, 2006 12:03 PM
MessageBox Ric_H General .NET 2 April 19th, 2006 01:45 PM
Messagebox mh VB.NET 27 March 31st, 2005 01:41 PM
MessageBox asbayani ASP.NET 1.0 and 1.1 Basics 3 July 29th, 2003 03:02 AM





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