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

C#

 
GeneralRe: eboard Pin
Eddy Vluggen5-Dec-10 11:13
professionalEddy Vluggen5-Dec-10 11:13 
AnswerRe: eboard Pin
Eddy Vluggen28-Nov-10 22:53
professionalEddy Vluggen28-Nov-10 22:53 
GeneralRe: eboard Pin
om_metab5-Dec-10 2:14
om_metab5-Dec-10 2:14 
GeneralRe: eboard Pin
Eddy Vluggen5-Dec-10 11:25
professionalEddy Vluggen5-Dec-10 11:25 
QuestionMessage Removed Pin
28-Nov-10 21:31
professionalVimalsoft(Pty) Ltd28-Nov-10 21:31 
AnswerRe: List Shows Different Values entered in the textbox Pin
Keith Barrow28-Nov-10 22:02
professionalKeith Barrow28-Nov-10 22:02 
QuestionWant to write a Updater exe Pin
Anil Kumar.Arvapalli28-Nov-10 18:40
Anil Kumar.Arvapalli28-Nov-10 18:40 
AnswerRe: Want to write a Updater exe Pin
RaviRanjanKr28-Nov-10 19:36
professionalRaviRanjanKr28-Nov-10 19:36 
AnswerRe: Want to write a Updater exe Pin
Abhinav S28-Nov-10 20:09
Abhinav S28-Nov-10 20:09 
QuestionHow to create a DXF file? Pin
westanbul28-Nov-10 4:51
westanbul28-Nov-10 4:51 
AnswerRe: How to create a DXF file? Pin
PIEBALDconsult28-Nov-10 5:02
mvePIEBALDconsult28-Nov-10 5:02 
AnswerRe: How to create a DXF file? Pin
Luc Pattyn28-Nov-10 5:45
sitebuilderLuc Pattyn28-Nov-10 5:45 
AnswerRe: How to create a DXF file? Pin
Abhinav S28-Nov-10 5:49
Abhinav S28-Nov-10 5:49 
AnswerRe: How to create a DXF file? Pin
westanbul28-Nov-10 8:40
westanbul28-Nov-10 8:40 
GeneralRe: How to create a DXF file? Pin
Richard MacCutchan28-Nov-10 10:20
mveRichard MacCutchan28-Nov-10 10:20 
AnswerRe: How to create a DXF file? Pin
Pete O'Hanlon28-Nov-10 10:35
mvePete O'Hanlon28-Nov-10 10:35 
QuestionDialogResult Question Pin
Jassim Rahma28-Nov-10 2:57
Jassim Rahma28-Nov-10 2:57 
AnswerRe: DialogResult Question Pin
Keith Barrow28-Nov-10 3:12
professionalKeith Barrow28-Nov-10 3:12 
AnswerRe: DialogResult Question Pin
PIEBALDconsult28-Nov-10 3:56
mvePIEBALDconsult28-Nov-10 3:56 
AnswerRe: DialogResult Question Pin
RaviRanjanKr28-Nov-10 5:04
professionalRaviRanjanKr28-Nov-10 5:04 
jrahma wrote:
the DialogResult.Ok will always close?


No there is no need to close() method. I let you two Condition where how it works.

Condition: 1)
Lets two Form Name Form1 and Form2
take a button on each form1 and form2.
in Form2 on button click event write
this.DialogResult == DialogResult.OK;

and now come to form1 and write given code on button click event.
Form2 obj = new Form2();
        obj.ShowDialog();

and Execute your application.
and now click on button of Form1 it shows Form2 and when click on button of form2 it close itself.

Condition: 2)
take a two button button1 and button2 on single form name Form1
and write given code on button1 click event
this.DialogResult = DialogResult.OK;

and then write below code on button2 click event
Form1 obj = new Form1();
           obj.ShowDialog();

and execute your application
and when you create on button2 it open New form of itself and then when you click on button1 it close itself.

Finally you noticed in both condition there is no need to use close.

modified on Sunday, November 28, 2010 9:02 PM

AnswerRe: DialogResult Question Pin
Luc Pattyn28-Nov-10 5:46
sitebuilderLuc Pattyn28-Nov-10 5:46 
GeneralRe: DialogResult Question Pin
Luc Pattyn28-Nov-10 12:34
sitebuilderLuc Pattyn28-Nov-10 12:34 
AnswerRe: DialogResult Question Pin
Dr.Walt Fair, PE28-Nov-10 7:19
professionalDr.Walt Fair, PE28-Nov-10 7:19 
AnswerRe: DialogResult Question [modified] Pin
Luc Pattyn28-Nov-10 7:25
sitebuilderLuc Pattyn28-Nov-10 7:25 
AnswerRe: DialogResult Question Pin
Dave Kreskowiak28-Nov-10 11:39
mveDave Kreskowiak28-Nov-10 11:39 

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.