Click here to Skip to main content
15,890,282 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: save my codes source Pin
Abhinav S24-May-13 1:24
Abhinav S24-May-13 1:24 
AnswerRe: save my codes source Pin
MaulikDusara26-May-13 18:15
MaulikDusara26-May-13 18:15 
Questionvalidating on custom datagridview column Pin
sh-a19-May-13 23:56
sh-a19-May-13 23:56 
AnswerRe: validating on custom datagridview column Pin
sh-a22-May-13 4:27
sh-a22-May-13 4:27 
QuestionDialogBasics asin MFC. Pin
Bram van Kampen15-May-13 13:58
Bram van Kampen15-May-13 13:58 
AnswerRe: DialogBasics asin MFC. Pin
Richard MacCutchan15-May-13 22:10
mveRichard MacCutchan15-May-13 22:10 
GeneralRe: DialogBasics as in MFC. Pin
Bram van Kampen16-May-13 14:05
Bram van Kampen16-May-13 14:05 
GeneralRe: DialogBasics as in MFC. Pin
Richard MacCutchan16-May-13 21:07
mveRichard MacCutchan16-May-13 21:07 
I think you misunderstand where the scope of the object starts and ends. The code snippet I showed you is the way to do it. When you press the OK button of your dialog, the dialog's window is no longer displayed, but the dialog object still exists, so you can extract the data from its components. For example:
C#
void someMethod()
{
    this.Hide()                     // hides the main form window
    LogonForm lf = new LogonForm()  // create a new LogonForm object
    result = lf.ShowDialog();       // call the LogonForm object's ShowDialog() method, which
                                    // shows the LogonForm window and waits for user input
                                    // user pressed OK (or cancel), window no longer on display
    variable = lf.textbox1;         // LogonForm object still exists, extract user input data
}                                   // LogonForm object gets disposed here

Use the best guess

GeneralRe: DialogBasics as in MFC. Pin
Bram van Kampen17-May-13 9:35
Bram van Kampen17-May-13 9:35 
GeneralRe: DialogBasics as in MFC. Pin
Richard MacCutchan17-May-13 22:45
mveRichard MacCutchan17-May-13 22:45 
QuestionI suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger15-May-13 11:43
M-Badger15-May-13 11:43 
AnswerRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
Eddy Vluggen16-May-13 5:01
professionalEddy Vluggen16-May-13 5:01 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger16-May-13 8:34
M-Badger16-May-13 8:34 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
Eddy Vluggen16-May-13 9:13
professionalEddy Vluggen16-May-13 9:13 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger16-May-13 9:57
M-Badger16-May-13 9:57 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
Eddy Vluggen16-May-13 11:25
professionalEddy Vluggen16-May-13 11:25 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger16-May-13 9:58
M-Badger16-May-13 9:58 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
Eddy Vluggen16-May-13 11:26
professionalEddy Vluggen16-May-13 11:26 
AnswerRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
jschell16-May-13 7:57
jschell16-May-13 7:57 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger16-May-13 8:37
M-Badger16-May-13 8:37 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
jschell17-May-13 10:13
jschell17-May-13 10:13 
AnswerRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
TnTinMn16-May-13 13:37
TnTinMn16-May-13 13:37 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger17-May-13 6:49
M-Badger17-May-13 6:49 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
TnTinMn17-May-13 8:33
TnTinMn17-May-13 8:33 
GeneralRe: I suspect there's a Pattern for This: Optional Parameters vs. Overloading Pin
M-Badger17-May-13 21:47
M-Badger17-May-13 21:47 

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.