Communication between forms

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Dave Mc

    Communication between forms

    Newbie to .NET question
    I have a form Form1 that will instantiate and show a second form
    Form2. Form2 has a slidder control that I want to use to update a
    value of an activeX control on Form1.
    How the heck is this done. In a regular Windows app in C++ I could
    just post a message in VB I could call an event on the other form. In
    C# .NET???? I am lost. Would some kind sole please show me the way?
  • Morten Wennevik

    #2
    Re: Communication between forms

    You can throw events in C# too, or you can pass the Form1 reference to
    Form2 when you create it.

    Form2 newForm = new Form2(this);

    public Form2(Form1 parent)
    {
    }

    --
    Using M2, Opera's revolutionary e-mail client: http://www.opera.com/m2/

    Comment

    • AA

      #3
      Re: Communication between forms

      Check the "Owner" property.


      AA
      "Dave Mc" <mcdermidd@spri ntmail.com> escribió en el mensaje
      news:64d0a7ed.0 311131653.5d88e 44@posting.goog le.com...[color=blue]
      > Newbie to .NET question
      > I have a form Form1 that will instantiate and show a second form
      > Form2. Form2 has a slidder control that I want to use to update a
      > value of an activeX control on Form1.
      > How the heck is this done. In a regular Windows app in C++ I could
      > just post a message in VB I could call an event on the other form. In
      > C# .NET???? I am lost. Would some kind sole please show me the way?[/color]


      Comment

      Working...