I created a usercontrol a while back with some 3D objects using the Tao Framework. This control uses several object files as a resource to describe the 3D objects. To test it, I placed a form in the project, placed the usercontrol on the form, then ran and everything looked good.
Now, I want to use the usercontrol in another project. I put all of the classes from the first project into the new project, but I could not place the usercontrol on a form from the toolbox. Finally, I added a reference to the first project's .exe (something I'd really rather not have to do) and it let me place the usercontrol on the new form. However, it will not compile.
In the subroutine where I want to import the objects (see code), I get an error that says each object "is not a member of 'Resources'." In the first project that compiles and runs, Resources is shown as a Class and contains the objects. In the InializeComponent sub of one of the classes is the line:
Dim resources As New System.ComponentModel.Comp
In the second project with the errors, Resources is shown as a NameSpace and does not have the objects. The code below shows where the errors are occuring, one for each object.
I don't have enough experience with vb.net to know how this works. In old VB6 we just put all the modules in the project and everything came together.
Can someone explain to me what this means and how to overcome the errors? Also, I presume referencing the .exe is using it like an external assembly. Is there a way to use the usercontrol from within the second project without having an external assembly?
Private Sub ImportObject()
Dim buffer() As Byte = Nothing
If XYZ= "1" Then
buffer = Resources.Object1
ElseIf XYZ= "2" Then
buffer = Resources.Object2