By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
443,515 Members | 1,061 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 443,515 IT Pros & Developers. It's quick & easy.

How to access class instance of main form

P: n/a
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
Nov 21 '05 #1
Share this Question
Share on Google+
2 Replies


P: n/a
Diomatas

Make it public/friend in the class you instance it.

Cor
Nov 21 '05 #2

P: n/a
* "=?Utf-8?B?RGlvbWF0YXM=?=" <Di******@discussions.microsoft.com> scripsit:
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
///

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>
Nov 21 '05 #3

This discussion thread is closed

Replies have been disabled for this discussion.