Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
GeneralRe: ArrayList Problem Pin
AB77716-Mar-06 19:11
AB77716-Mar-06 19:11 
GeneralRe: ArrayList Problem Pin
DigitalKing6-Mar-06 19:18
DigitalKing6-Mar-06 19:18 
GeneralRe: ArrayList Problem Pin
AB77716-Mar-06 19:28
AB77716-Mar-06 19:28 
QuestionHow to acess a floopy drive in c#? Pin
nitin_ap6-Mar-06 18:38
nitin_ap6-Mar-06 18:38 
AnswerRe: How to acess a floopy drive in c#? Pin
hackerhcm6-Mar-06 18:57
hackerhcm6-Mar-06 18:57 
QuestionRename computer hostname Pin
picasso26-Mar-06 17:28
picasso26-Mar-06 17:28 
AnswerRe: Rename computer hostname Pin
Vasudevan Deepak Kumar6-Mar-06 18:13
Vasudevan Deepak Kumar6-Mar-06 18:13 
GeneralRe: Rename computer hostname Pin
picasso26-Mar-06 18:57
picasso26-Mar-06 18:57 
QuestionMdi Active child Pin
JacquesDP6-Mar-06 17:27
JacquesDP6-Mar-06 17:27 
AnswerRe: Mdi Active child Pin
DigitalKing6-Mar-06 17:50
DigitalKing6-Mar-06 17:50 
GeneralRe: Mdi Active child Pin
JacquesDP6-Mar-06 18:03
JacquesDP6-Mar-06 18:03 
AnswerRe: Mdi Active child Pin
DigitalKing6-Mar-06 18:13
DigitalKing6-Mar-06 18:13 
GeneralRe: Mdi Active child Pin
JacquesDP6-Mar-06 18:49
JacquesDP6-Mar-06 18:49 
AnswerRe: Mdi Active child Pin
DigitalKing6-Mar-06 18:59
DigitalKing6-Mar-06 18:59 
GeneralRe: Mdi Active child Pin
PavanPabolu6-Nov-10 11:21
PavanPabolu6-Nov-10 11:21 
GeneralRe: Mdi Active child Pin
JacquesDP6-Mar-06 18:23
JacquesDP6-Mar-06 18:23 
Questionbind the datagrid Pin
angelagke6-Mar-06 16:09
angelagke6-Mar-06 16:09 
AnswerRe: bind the datagrid Pin
goyal manish6-Mar-06 18:00
goyal manish6-Mar-06 18:00 
GeneralRe: bind the datagrid Pin
angelagke6-Mar-06 18:13
angelagke6-Mar-06 18:13 
GeneralRe: bind the datagrid Pin
goyal manish6-Mar-06 23:56
goyal manish6-Mar-06 23:56 
GeneralRe: bind the datagrid Pin
goyal manish7-Mar-06 0:03
goyal manish7-Mar-06 0:03 
GeneralRe: bind the datagrid Pin
angelagke8-Mar-06 16:12
angelagke8-Mar-06 16:12 
Questioncancel event Pin
Dominic Farr6-Mar-06 16:07
Dominic Farr6-Mar-06 16:07 
AnswerRe: cancel event Pin
DigitalKing6-Mar-06 17:32
DigitalKing6-Mar-06 17:32 
GeneralRe: cancel event Pin
Dominic Farr7-Mar-06 7:25
Dominic Farr7-Mar-06 7:25 
The problem stems from button1 having it's DialogResult property set.

When button1 click event is fired, it executes button1_Click, displays the are you sure dialog and regardless of the result of the are you sure dialog will close the window form because it has a DialogResult set.

I was wondering if I could cancel this close window event depending on the result of the are you sure dialog.

I can simply not set the DialogResult property of button1, and set the DialogResult in the button1_Click event depending on the result of the are you sure dialog.

Regards.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.