Click here to Skip to main content
15,908,111 members
Home / Discussions / C#
   

C#

 
AnswerRe: Select free port automatically Pin
ABitSmart5-Mar-09 18:58
ABitSmart5-Mar-09 18:58 
AnswerRe: Select free port automatically Pin
Bharat Jain5-Mar-09 19:48
Bharat Jain5-Mar-09 19:48 
Questioncomponents and verbs Pin
damichab5-Mar-09 16:39
damichab5-Mar-09 16:39 
AnswerRe: components and verbs Pin
0x3c06-Mar-09 2:13
0x3c06-Mar-09 2:13 
GeneralRe: components and verbs Pin
damichab6-Mar-09 12:40
damichab6-Mar-09 12:40 
Questionhow to open a form when click on custom property item in propertygridview. Pin
dilipmca045-Mar-09 16:33
dilipmca045-Mar-09 16:33 
AnswerRe: how to open a form when click on custom property item in propertygridview. Pin
Dragonfly_Lee5-Mar-09 17:55
Dragonfly_Lee5-Mar-09 17:55 
Questionhow to open a form when click on custom property item in propertygridview Pin
dilipmca045-Mar-09 16:29
dilipmca045-Mar-09 16:29 
Questionnested lists problem Pin
VitroBlue5-Mar-09 15:42
VitroBlue5-Mar-09 15:42 
AnswerRe: nested lists problem Pin
Christian Graus5-Mar-09 15:55
protectorChristian Graus5-Mar-09 15:55 
AnswerRe: nested lists problem Pin
Luc Pattyn5-Mar-09 23:51
sitebuilderLuc Pattyn5-Mar-09 23:51 
Questionexporting to Excel Pin
avvaru.murali5-Mar-09 15:18
avvaru.murali5-Mar-09 15:18 
AnswerRe: exporting to Excel Pin
Christian Graus5-Mar-09 15:52
protectorChristian Graus5-Mar-09 15:52 
AnswerRe: exporting to Excel Pin
Ramkithepower5-Mar-09 19:24
Ramkithepower5-Mar-09 19:24 
Questionneed help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 15:04
YiXiang_895-Mar-09 15:04 
AnswerRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
_Maxxx_5-Mar-09 15:12
professional_Maxxx_5-Mar-09 15:12 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 15:19
YiXiang_895-Mar-09 15:19 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
Christian Graus5-Mar-09 15:56
protectorChristian Graus5-Mar-09 15:56 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 16:13
YiXiang_895-Mar-09 16:13 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
_Maxxx_5-Mar-09 17:41
professional_Maxxx_5-Mar-09 17:41 
GeneralRe: need help..... How to link the current website that i am browsing to the textbox ? Pin
YiXiang_895-Mar-09 18:05
YiXiang_895-Mar-09 18:05 
QuestionHelp on CancelButton property? Pin
Wes Jones5-Mar-09 14:41
Wes Jones5-Mar-09 14:41 
Hi,

n00b style question time... In my form's CancelButton property, I've set it to btnCancel, which is a button on my form, of course.
In the implementation, if I detect changes, I prompt the user if they're sure about discarding changes, and if they say no, the idea is to leave the form open.
Even though I'm not calling Close(), the form still closes anyway, probably as a result of it being associated w/ the CancelButton property. How can I cancel this behavior so that the screen remains open if they don't want to discard changes?

my btnCancel_Click(..) func is implemented like so:

private void btnCancel_Click(object sender, EventArgs e)
{
  if( HasChanges() )
  {
     if( Yes == MgBox: "You sure 'bout that?") )
        this.Close();
     else
        return;
  }
   else
       this.Close();        
}


Thanks!
AnswerRe: Help on CancelButton property? [modified] Pin
Xmen Real 5-Mar-09 15:04
professional Xmen Real 5-Mar-09 15:04 
GeneralRe: Help on CancelButton property? Pin
Wes Jones5-Mar-09 16:01
Wes Jones5-Mar-09 16:01 
AnswerRe: Help on CancelButton property? Pin
_Maxxx_5-Mar-09 15:07
professional_Maxxx_5-Mar-09 15:07 

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.