Click here to Skip to main content
15,889,595 members
Home / Discussions / C#
   

C#

 
GeneralExecuting Another Application From a C# Program Pin
vylkier5-Jun-05 15:47
vylkier5-Jun-05 15:47 
GeneralRe: Executing Another Application From a C# Program Pin
Christian Graus5-Jun-05 15:52
protectorChristian Graus5-Jun-05 15:52 
QuestionFirewall??? Pin
Duong Tien Nam5-Jun-05 15:31
Duong Tien Nam5-Jun-05 15:31 
AnswerRe: Firewall??? Pin
rocky_pulley6-Jun-05 2:25
rocky_pulley6-Jun-05 2:25 
GeneralUsing an image as a resource programmatically... Pin
new_phoenix5-Jun-05 14:53
new_phoenix5-Jun-05 14:53 
GeneralRe: Using an image as a resource programmatically... Pin
Christian Graus5-Jun-05 15:18
protectorChristian Graus5-Jun-05 15:18 
GeneralRe: Using an image as a resource programmatically... Pin
new_phoenix7-Jun-05 9:24
new_phoenix7-Jun-05 9:24 
GeneralWinForms keeps closing my dialogs !!! Pin
Christian Graus5-Jun-05 12:09
protectorChristian Graus5-Jun-05 12:09 
I have a dialog box to send email. Initially, I set the AcceptButton/CancelButton properties, but they are not set anymore. Instead, I set DialogResult myself, and in the click handler for the OK button I do something like this

if (check if emailaddress is not valid )
{
MessageBox.Show("blah blah");
}
else if (check something else)
//etc
else
{
// send the email
this.Close();
}

No matter what happens, the dialog closes when this handler is called.

I created a second dialog to configure the server details, etc. Same setup, used my own handler for clicking OK and Cancel. If you click the OK button, similar code works fine without closing the dialog. If you click cancel, the dialog closes, and so does the dialog that spawned it.

Does anyone know what's going on here ?

Christian Graus - Microsoft MVP - C++
GeneralRe: WinForms keeps closing my dialogs !!! Pin
DavidNohejl5-Jun-05 12:44
DavidNohejl5-Jun-05 12:44 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Christian Graus5-Jun-05 12:51
protectorChristian Graus5-Jun-05 12:51 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
DavidNohejl5-Jun-05 13:46
DavidNohejl5-Jun-05 13:46 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Judah Gabriel Himango5-Jun-05 13:43
sponsorJudah Gabriel Himango5-Jun-05 13:43 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Christian Graus5-Jun-05 13:46
protectorChristian Graus5-Jun-05 13:46 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
DavidNohejl5-Jun-05 13:47
DavidNohejl5-Jun-05 13:47 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Scott Serl5-Jun-05 14:49
Scott Serl5-Jun-05 14:49 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Christian Graus5-Jun-05 15:16
protectorChristian Graus5-Jun-05 15:16 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Ashok Dhamija5-Jun-05 18:34
Ashok Dhamija5-Jun-05 18:34 
GeneralRe: WinForms keeps closing my dialogs !!! Pin
Christian Graus5-Jun-05 18:38
protectorChristian Graus5-Jun-05 18:38 
GeneralAdd Refrences in runTime Pin
Web cam5-Jun-05 9:58
Web cam5-Jun-05 9:58 
GeneralRe: Add Refrences in runTime Pin
Carsten Zeumer5-Jun-05 11:40
Carsten Zeumer5-Jun-05 11:40 
GeneralRe: Add Refrences in runTime Pin
DavidNohejl5-Jun-05 12:04
DavidNohejl5-Jun-05 12:04 
QuestionCOORDINATES NOT CENTERED? Pin
...---...5-Jun-05 7:00
...---...5-Jun-05 7:00 
AnswerRe: COORDINATES NOT CENTERED? Pin
S. Senthil Kumar5-Jun-05 7:21
S. Senthil Kumar5-Jun-05 7:21 
GeneralRe: COORDINATES NOT CENTERED? Pin
Anonymous5-Jun-05 9:07
Anonymous5-Jun-05 9:07 
AnswerRe: COORDINATES NOT CENTERED? Pin
Carsten Zeumer5-Jun-05 8:09
Carsten Zeumer5-Jun-05 8:09 

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.