Click here to Skip to main content
15,904,023 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reload a opened form another form Pin
Pete O'Hanlon19-Jul-07 23:14
mvePete O'Hanlon19-Jul-07 23:14 
GeneralRe: Reload a opened form another form Pin
Martin#19-Jul-07 23:33
Martin#19-Jul-07 23:33 
AnswerRe: Reload a opened form another form Pin
T.EDY19-Jul-07 23:09
T.EDY19-Jul-07 23:09 
GeneralRe: Reload a opened form another form Pin
Martin#19-Jul-07 23:22
Martin#19-Jul-07 23:22 
GeneralRe: Reload a opened form another form Pin
T.EDY19-Jul-07 23:47
T.EDY19-Jul-07 23:47 
GeneralRe: Reload a opened form another form Pin
Martin#19-Jul-07 23:49
Martin#19-Jul-07 23:49 
GeneralRe: Reload a opened form another form Pin
T.EDY20-Jul-07 0:09
T.EDY20-Jul-07 0:09 
AnswerRe: Reload a opened form another form Pin
Pete O'Hanlon19-Jul-07 23:11
mvePete O'Hanlon19-Jul-07 23:11 
As Martin stated, you should use the ShowDialog method. Then, depending on the DialogResult from the form, you would reload the data (as it doesn't make sense to reload the data if you haven't actually done the save).

Suppose that you have a form called OptionsDialog which you are going to use to add some options into a program and that the details will be saved to the database when the user clicks OK. In this form, set the DialogResult of the OK button to OK.

In your parent form, you would call it with something like this:
private void AddOptions()
{
  using (OptionsDialog dlg = new OptionsDialog())
  {
    if (dlg.ShowDialog(this) == DialogResult.OK)
    {
      ReloadOptions();
    }
  }
}
I hope that this helps.

Deja View - the feeling that you've seen this post before.

GeneralRe: Reload a opened form another form Pin
N a v a n e e t h19-Jul-07 23:31
N a v a n e e t h19-Jul-07 23:31 
GeneralRe: Reload a opened form another form Pin
Martin#19-Jul-07 23:54
Martin#19-Jul-07 23:54 
GeneralRe: Reload a opened form another form Pin
Pete O'Hanlon19-Jul-07 23:59
mvePete O'Hanlon19-Jul-07 23:59 
GeneralRe: Reload a opened form another form Pin
N a v a n e e t h20-Jul-07 1:21
N a v a n e e t h20-Jul-07 1:21 
GeneralRe: Reload a opened form another form Pin
Pete O'Hanlon20-Jul-07 1:46
mvePete O'Hanlon20-Jul-07 1:46 
GeneralRe: Reload a opened form another form Pin
Nisha S.20-Jul-07 0:25
Nisha S.20-Jul-07 0:25 
QuestionChange in Ad rotator control using specfic time interval Pin
MutantR19-Jul-07 22:04
MutantR19-Jul-07 22:04 
AnswerRe: Change in Ad rotator control using specfic time interval Pin
Sathesh Sakthivel19-Jul-07 22:13
Sathesh Sakthivel19-Jul-07 22:13 
JokeRe: Change in Ad rotator control using specfic time interval Pin
Martin#19-Jul-07 23:08
Martin#19-Jul-07 23:08 
QuestionCreating textbox in c++ Pin
garga119-Jul-07 21:37
garga119-Jul-07 21:37 
AnswerRe: Creating textbox in c++ Pin
Sathesh Sakthivel19-Jul-07 21:44
Sathesh Sakthivel19-Jul-07 21:44 
AnswerRe: Creating textbox in c++ Pin
T.EDY19-Jul-07 21:46
T.EDY19-Jul-07 21:46 
QuestionOpen Outlook window using C# Pin
ShahzadLatif19-Jul-07 21:07
ShahzadLatif19-Jul-07 21:07 
AnswerRe: Open Outlook window using C# Pin
Amjath Rahman19-Jul-07 23:37
Amjath Rahman19-Jul-07 23:37 
GeneralRe: Open Outlook window using C# Pin
ShahzadLatif20-Jul-07 18:28
ShahzadLatif20-Jul-07 18:28 
Questionmy values are not inserting into database Pin
srinivassam19-Jul-07 21:05
srinivassam19-Jul-07 21:05 
AnswerRe: my values are not inserting into database Pin
N a v a n e e t h19-Jul-07 21:25
N a v a n e e t h19-Jul-07 21:25 

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.