Click here to Skip to main content
15,887,776 members
Home / Discussions / C#
   

C#

 
QuestionDialog result Question Pin
MumbleB3-May-08 5:08
MumbleB3-May-08 5:08 
AnswerRe: Dialog result Question Pin
MumbleB3-May-08 5:09
MumbleB3-May-08 5:09 
GeneralRe: Dialog result Question Pin
Luc Pattyn3-May-08 5:32
sitebuilderLuc Pattyn3-May-08 5:32 
GeneralRe: Dialog result Question Pin
PIEBALDconsult3-May-08 6:05
mvePIEBALDconsult3-May-08 6:05 
GeneralRe: Dialog result Question Pin
Oakman3-May-08 12:37
Oakman3-May-08 12:37 
GeneralRe: Dialog result Question Pin
PIEBALDconsult4-May-08 5:57
mvePIEBALDconsult4-May-08 5:57 
GeneralRe: Dialog result Question Pin
Charith Jayasundara3-May-08 6:42
Charith Jayasundara3-May-08 6:42 
GeneralRe: Dialog result Question Pin
Luc Pattyn3-May-08 6:49
sitebuilderLuc Pattyn3-May-08 6:49 
Hi,

IMO the best way is by testing for a positive, as in:

if (openFileDialog1.ShowDialog() == DialogResult.OK) {
    // do whatever is supposed to happen on OK
}           }


That way, if for whatever reason something other than OK and Cancel gets returned,
nothing will happen.

I tend to avoid negative tests, they tend to confuse people sometimes.

Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

I dislike the black-and-white voting system on questions/answers. Dead | X|


GeneralRe: Dialog result Question Pin
MumbleB3-May-08 21:54
MumbleB3-May-08 21:54 
GeneralRe: Dialog result Question Pin
Luc Pattyn3-May-08 22:53
sitebuilderLuc Pattyn3-May-08 22:53 
GeneralRe: Dialog result Question Pin
MumbleB3-May-08 23:56
MumbleB3-May-08 23:56 
GeneralRe: Dialog result Question Pin
PIEBALDconsult4-May-08 5:04
mvePIEBALDconsult4-May-08 5:04 
GeneralRe: Dialog result Question Pin
Luc Pattyn4-May-08 11:44
sitebuilderLuc Pattyn4-May-08 11:44 
QuestionProblem with get set Pin
Saba023-May-08 4:01
Saba023-May-08 4:01 
AnswerRe: Problem with get set Pin
snorkie3-May-08 4:05
professionalsnorkie3-May-08 4:05 
AnswerRe: Problem with get set Pin
Saba023-May-08 4:23
Saba023-May-08 4:23 
QuestionADO.Net, DataGridView and Concurrency Pin
paas3-May-08 4:01
paas3-May-08 4:01 
AnswerRe: ADO.Net, DataGridView and Concurrency Pin
Rob Graham3-May-08 4:52
Rob Graham3-May-08 4:52 
AnswerRe: ADO.Net, DataGridView and Concurrency Pin
Giorgi Dalakishvili3-May-08 5:37
mentorGiorgi Dalakishvili3-May-08 5:37 
GeneralRe: ADO.Net, DataGridView and Concurrency Pin
Rob Graham3-May-08 6:20
Rob Graham3-May-08 6:20 
QuestionStackOverFlowException error in C# Pin
ADTC#3-May-08 3:32
ADTC#3-May-08 3:32 
AnswerRe: StackOverFlowException error in C# Pin
adamzhang3-May-08 3:45
adamzhang3-May-08 3:45 
AnswerRe: StackOverFlowException error in C# Pin
Jimmanuel3-May-08 4:13
Jimmanuel3-May-08 4:13 
AnswerRe: StackOverFlowException error in C# Pin
User 66583-May-08 5:34
User 66583-May-08 5:34 
AnswerRe: StackOverFlowException error in C# Pin
Luc Pattyn3-May-08 5:35
sitebuilderLuc Pattyn3-May-08 5:35 

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.