Actions between non modal forms

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

    #1

    Actions between non modal forms

    Hi,
    I'd like to create a non modal form in which, when the user press a button,
    another non modal form (and non mdi) already present updates and refreshes
    its db values. Unfortunately i don't know how the 1st form can communicate
    with the second one (i haven't found something like this in the help about
    communications between non-modal form).

    Even if i know the IntPtr Handle of the 2nd form, how can i access to
    components of this form? (however i think this is not the correct solution).

    Thanks a lot
    --
    Bruno


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: Actions between non modal forms

    Bruno,

    When you create the second form, pass a reference to the first form to
    it. Basically, when the button is clicked and you create the form, pass
    (through a property, method, or field) "this" (meaning the first form) to
    the second. Then, in the second form, you can take that reference and make
    calls on it back to the first.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - nick(dot)paldin o=at=exisconsul ting<dot>com

    "Bruno" <gajira.norimak iNOSPAM@libero. it> wrote in message
    news:bm5u1n$deu $1@news.unina.i t...[color=blue]
    > Hi,
    > I'd like to create a non modal form in which, when the user press a[/color]
    button,[color=blue]
    > another non modal form (and non mdi) already present updates and refreshes
    > its db values. Unfortunately i don't know how the 1st form can communicate
    > with the second one (i haven't found something like this in the help about
    > communications between non-modal form).
    >
    > Even if i know the IntPtr Handle of the 2nd form, how can i access to
    > components of this form? (however i think this is not the correct[/color]
    solution).[color=blue]
    >
    > Thanks a lot
    > --
    > Bruno
    >
    >[/color]


    Comment

    Working...