Communication between forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Stéphane Roucheray

    #1

    Communication between forms

    Hi all,

    I have two forms a MainForm which is the entry point of my application and I created a 'Settings..' dialog box which appears when I click on my itemmenu 'Setting'.

    I had no problem to get the results from the 'setting' form into my MainForm when I use :
    if (SettingForm.Sh owDialog() == DialogResult.OK )
    {
    //I process the results
    }

    But I want my results to be handled by the MainForm without the SettingForm disappearing. Just like if I had an 'Apply' button. With this feature I could change several time my settings and directly observe the effect in the MainForm.

    May you help me please.
  • Matt Burland

    #2
    Re: Communication between forms


    "Stéphane Roucheray" <StphaneRoucher ay@discussions. microsoft.com> wrote in
    message news:C82B8ADD-B84E-4C82-8F1D-E7A608F816B2@mi crosoft.com...[color=blue]
    > Hi all,
    >
    > I have two forms a MainForm which is the entry point of my application and[/color]
    I created a 'Settings..' dialog box which appears when I click on my
    itemmenu 'Setting'.[color=blue]
    >
    > I had no problem to get the results from the 'setting' form into my[/color]
    MainForm when I use :[color=blue]
    > if (SettingForm.Sh owDialog() == DialogResult.OK )
    > {
    > //I process the results
    > }
    >
    > But I want my results to be handled by the MainForm without the[/color]
    SettingForm disappearing. Just like if I had an 'Apply' button. With this
    feature I could change several time my settings and directly observe the
    effect in the MainForm.[color=blue]
    >
    > May you help me please.[/color]

    You could have your "Apply" button fire an event that the main form could
    subscribe to.


    Comment

    Working...