I've to a solution with two projects:
Bungalow
New Programs
New Programs has a ref to Bungalow.
Bungalow has a Module called Bungalow which has a Public Function (clone_control())
From within 'New Programs' I can not access Clone_Control.
However, if I drag (wihin the Solution Explorer) the Bungalow module from Bungalow to New Programs, then it works OK.
I thought that adding a reference was like letting all the contents of the referenced project be "in" in the referring project.
Is this just the way it works or am I missing something
MORE INFO
In addition, if I type "bungalow." I get intellisense only for the FORM and CONTROL files in the Bungalow project, not the Bungalow.vb module.
(BTW, I also tried this by creating a module in Project Bungalow called 'eraseme' and public sub within that demonstrates the same symptom.

Accessing Public Function located in another Project referenced within the same Solution
jlawing
Have you considered making both projects part of the same Solution (Maybe that's what you meant by dragging one into the other...)
Part of the problem is that with Win32 applications, Microsoft makes it hard for one program to interfere with the workings of another internally. (Encourages the programs to cooperate using "official" systems like sending messages...)
angelbear
damy
In addition to the reference you either need to fully qualify the name or use an imports statement:
Class NewPrograms
Private Sub Test
Bungalow. Bungalow.clone_Control
end sub
end class
OR
Imports Bungalow.Bungalow
Class NewPrograms
Private Sub Test
clone_Control
end sub
end class
ElizabethS
try this simple example
Create two Console application projects in a solution
ConsoleApplication1 would be the project that you are going to rum - the code will look something similar to this.
Public Module Module1
Sub Main
Console.Writeline("App1")
ConsoleApplication2.Module1.Foo
End Sub
End Module
Add a reference to ConsoleApplication2 in the ConsoleApplication1 project.
Console Application2 will be very similar
Public Module Module1
Sub Main
Console.Writeline("App2")
End Sub
Public Sub Foo
Console.Writeline("App2 Foo")
End Sub
End Module
If you run ConsoleApplication2 then you should get some output like
App2
App2 Foo
If you run ConsoleApplication1 then you should get
App1
App2 Foo
This should work....
Skidmark
Izu
Also you may want to check the module itself is also public as well, otherwise a public function inside a private module will not be visible from the other project.
Also you may want to check the module itself is also public as well, otherwise a public function inside a private module will not be visible from the other project.
Public Module Bungalow
Public Sub clone_Control
...
End Sub
End Module
With this Bungalow.Clone_control should be visible to other projects that reference it. You may want to check the Project Properties as to what the root namespace is. If it is set to something then you will either need to use the imports statement or when calling the method use the fully qualified name
<Namespace>.Bungalow.Clone_control