|
-
Jun 22nd, 2006, 03:12 AM
#1
Thread Starter
Member
object instance reference from another form
Greetings.
I have a two form application and need to access an instance of an object from another form. I dont want to create the new form (allready created) and dont need to create the object again.
example
Public Class Form1{
Public A as myobject
A = New myobject
...
... 'change properties of the instance of the object. i want those passed
...
}
Public Class Form2{
A.someproperty = value
}
I need to do that.
I think i need to create a reference of the object A for the Form2 but i dont want to create a new object. I need to have the instance as it has been modified from Form1.
Another issue that i think might be a problem (or not...just a thought) is that object A handles some events in Form1. Although i dont need to do that in form2. I just need to obtain some values of the object.
Any suggestions?
-
Jun 22nd, 2006, 03:25 AM
#2
Re: object instance reference from another form
I suggest that you read the Forms in VB.NET tutorial in my signature. It should answer this and many other questions.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|