How to access class instance of main form

G

Guest

I ve got tha start up mdi form frmMain and a customer class. I create a
public instance of Customer class. Then I want to use this instance at
another child form...

How can I refer to it?

Thank you in advance
 
H

Herfried K. Wagner [MVP]

* "=?Utf-8?B?RGlvbWF0YXM=?= said:
I ve got tha start up mdi form frmMain and a customer class. I create a
public instance of Customer class. Then I want to use this instance at
another child form...

Add a property of type 'Customer' to your main form, for example, and
then read this property in your MDI children:

\\\
Dim TheCustomer As Customer = DirectCast(Me.MdiParent, MainForm).Customer
///
 

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