Forms comunication

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dr Gui

    #1

    Forms comunication

    Public methods on the form to get & set the properties
    required is what you need here..
    [color=blue]
    >-----Original Message-----
    >Hi,
    >
    >I have a form where i start the program. Then, i must do[/color]
    some work that may[color=blue]
    >take a while to finish so i want to launch a second form[/color]
    with information of[color=blue]
    >the process. In that form i make the hard work and when[/color]
    finish i want to[color=blue]
    >modify (for example) a label in the main form. How do i[/color]
    do this? I can't fin[color=blue]
    >the way to modify the controls in the main form from the[/color]
    second form...[color=blue]
    >
    >This is some of my test code
    >
    >////Form1
    >public System.Windows. Forms.Label lbl;
    >....
    >button_Click(. ..)
    >{
    > Form2 frm = new Form2();
    > frm.frmparent = this;
    > frm.ShowDialog( this);
    >}
    >
    >////Form2
    >public Form1 frmparent
    >......
    >Form2_Load(... )
    >{
    > frmparent.lbl = "test";
    >}
    >
    >
    >.
    >[/color]
Working...