Click here to Skip to main content
15,914,162 members
Home / Discussions / C#
   

C#

 
QuestionHow to handel the dialog Result Pin
Iridania16-Nov-06 8:55
Iridania16-Nov-06 8:55 
AnswerRe: How to handel the dialog Result Pin
Judah Gabriel Himango16-Nov-06 9:39
sponsorJudah Gabriel Himango16-Nov-06 9:39 
If you want your form to not close when the No button is clicked, add an event handler to the Closing event instead of the Closed event. Your code would look like this:

Tienda.FormClosinng += new FormClosingEventHandler(Tienda_FormClosed);

...

private void Tienda_FormClosing(object sender, FormClosingEventArgs)
{
   DialogResult result = MessageBox.Show("Seguro desea Cerrar esta ventana?", "Tienda", MessageBoxButtons.YesNo, MessageBoxIcon.Information);
   if(result == DialogResult.No)
   {
      e.Cancel = true; // this will prevent the form from closing.
   }
}


Tech, life, family, faith: Give me a visit.
I'm currently blogging about: God-as-Judge, God-as-Forgiver
The apostle Paul, modernly speaking: Epistles of Paul

Judah Himango


AnswerRe: How to handel the dialog Result Pin
Justin.Jones16-Nov-06 9:39
Justin.Jones16-Nov-06 9:39 
QuestionUse C++ to make database application Pin
jingguangdadao16-Nov-06 7:49
jingguangdadao16-Nov-06 7:49 
AnswerRe: Use C++ to make database application Pin
Judah Gabriel Himango16-Nov-06 8:27
sponsorJudah Gabriel Himango16-Nov-06 8:27 
QuestionTechnical Design Strategy and Architectural Design Strategy for Messenger Pin
Sakrand16-Nov-06 7:43
Sakrand16-Nov-06 7:43 
QuestionError in WebBrowser Pin
maylels16-Nov-06 6:54
maylels16-Nov-06 6:54 
AnswerRe: Error in WebBrowser Pin
Judah Gabriel Himango16-Nov-06 8:54
sponsorJudah Gabriel Himango16-Nov-06 8:54 
GeneralRe: Error in WebBrowser Pin
maylels16-Nov-06 12:27
maylels16-Nov-06 12:27 
QuestionWhich componenets to register in deployment projects Pin
wasife16-Nov-06 6:41
wasife16-Nov-06 6:41 
QuestionSelect a node in a treeView using Mouse Right Click Pin
h@s@n16-Nov-06 6:23
h@s@n16-Nov-06 6:23 
AnswerRe: Select a node in a treeView using Mouse Right Click Pin
Judah Gabriel Himango16-Nov-06 6:40
sponsorJudah Gabriel Himango16-Nov-06 6:40 
QuestionCOM interop threading problem Pin
Emad Attia16-Nov-06 5:53
Emad Attia16-Nov-06 5:53 
AnswerRe: COM interop threading problem Pin
Judah Gabriel Himango16-Nov-06 6:35
sponsorJudah Gabriel Himango16-Nov-06 6:35 
GeneralRe: COM interop threading problem Pin
Emad Attia16-Nov-06 6:55
Emad Attia16-Nov-06 6:55 
QuestionHow to run custom code when List.Add or List.Remove is running Pin
Chris Richner16-Nov-06 5:38
Chris Richner16-Nov-06 5:38 
AnswerRe: How to run custom code when List.Add or List.Remove is running Pin
Judah Gabriel Himango16-Nov-06 6:29
sponsorJudah Gabriel Himango16-Nov-06 6:29 
AnswerRe: How to run custom code when List.Add or List.Remove is running Pin
Daniel Grunwald16-Nov-06 7:43
Daniel Grunwald16-Nov-06 7:43 
AnswerRe: How to run custom code when List.Add or List.Remove is running Pin
Chris Richner16-Nov-06 8:49
Chris Richner16-Nov-06 8:49 
QuestionSending Email Message Pin
zaboboa16-Nov-06 5:33
zaboboa16-Nov-06 5:33 
AnswerRe: Sending Email Message Pin
ednrgc16-Nov-06 6:15
ednrgc16-Nov-06 6:15 
QuestionGetting default namespace name Pin
Zoltan Balazs16-Nov-06 5:08
Zoltan Balazs16-Nov-06 5:08 
AnswerRe: Getting default namespace name Pin
led mike16-Nov-06 5:26
led mike16-Nov-06 5:26 
GeneralRe: Getting default namespace name Pin
Zoltan Balazs16-Nov-06 7:15
Zoltan Balazs16-Nov-06 7:15 
AnswerRe: Getting default namespace name Pin
Daniel Grunwald16-Nov-06 7:44
Daniel Grunwald16-Nov-06 7:44 

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.