Actions between non modal forms

B

Bruno

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
 
N

Nicholas Paldino [.NET/C# MVP]

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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top