Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I
access the code in one from the other? For example, there is a public member
in one project. How can I call it from the other form? When I try to do this
it says that the member is not declared.
Geoff 9 900
Geoff,
Add a reference to the project, if the public member is a property or method
of a public class then you should not have a problem accessing it.
Dan
"Geoff Jones" <no********@email.com> wrote in message
news:41*********************@news.dial.pipex.com.. . Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public
member in one project. How can I call it from the other form? When I try to do
this it says that the member is not declared.
Geoff
If you want to share code at source code level, that is, one project
"borrows" files of source code from the other, you must link the file using
"Add Existing Item..." menu and in the file dialog, select the file, drop
down the Open button and select Link File.
If you want to share code at binary (compiled) level, one of the projects
must be a Class Library and must be referenced by the other, using "Add
Reference..." menu, Project tab.
--
Carlos J. Quintero
The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com
"Geoff Jones" <no********@email.com> escribió en el mensaje
news:41*********************@news.dial.pipex.com.. . Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public member in one project. How can I call it from the other form? When I try to do this it says that the member is not declared.
Geoff
Hi
The code I'm trying to access is another form i.e. they are both forms. When
I try to Add Reference there doesn't seem to be anything to add.
Can you give any further help?
Geoff
"Carlos J. Quintero [.NET MVP]" <ca*****@NOSPAMsogecable.com> wrote in
message news:ef**************@TK2MSFTNGP10.phx.gbl... If you want to share code at source code level, that is, one project "borrows" files of source code from the other, you must link the file using "Add Existing Item..." menu and in the file dialog, select the file, drop down the Open button and select Link File.
If you want to share code at binary (compiled) level, one of the projects must be a Class Library and must be referenced by the other, using "Add Reference..." menu, Project tab.
--
Carlos J. Quintero
The MZ-Tools all-in-one add-in, now for .NET: http://www.mztools.com
"Geoff Jones" <no********@email.com> escribió en el mensaje news:41*********************@news.dial.pipex.com.. . Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public member in one project. How can I call it from the other form? When I try to do this it says that the member is not declared.
Geoff
Geoff,
Did you try the project add references and than the "Project" tab?
I hope this helps?
Cor
"Geoff Jones" <no********@email.com> Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public member in one project. How can I call it from the other form? When I try to do this it says that the member is not declared.
Geoff
Yes, but I couldn't see what to add
Geoff
"Cor Ligthert" <no************@planet.nl> wrote in message
news:Od******************@TK2MSFTNGP12.phx.gbl... Geoff,
Did you try the project add references and than the "Project" tab?
I hope this helps?
Cor
"Geoff Jones" <no********@email.com>
Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public member in one project. How can I call it from the other form? When I try to do this it says that the member is not declared.
Geoff
"Geoff Jones" <no********@email.com> schrieb: Yes, but I couldn't see what to add
In VB 2003, you can only add references to projects that are not Windows
Application projects. So you will have to make the code used by other
applications part of a class library project in order to be able to
reference it.
--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>
Geoff,
\\\
I made a new project
I added to that a new project
In that added project I changed in the properties the output type in the box
general to "class library"
Than I renamed the name of that form in that project to Geoff and the text
of the form as well
Than I did when I had again selected the first project, project -> add
reference -> with a a reference to the second project
I made an import to the second project on the form of the first project
Than I made a load event with in that
dim frm as new Geoff
frm.showdialog
Than I started debug
And than I saw Geoff
////
Maybe gives this a lead
Cor
"Geoff Jones" <no********@email.com> Yes, but I couldn't see what to add
Geoff
"Cor Ligthert" <no************@planet.nl> wrote in message news:Od******************@TK2MSFTNGP12.phx.gbl... Geoff,
Did you try the project add references and than the "Project" tab?
I hope this helps?
Cor
"Geoff Jones" <no********@email.com>
Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public member in one project. How can I call it from the other form? When I try to do this it says that the member is not declared.
Geoff
Many thanks Cor
Geoff
"Cor Ligthert" <no************@planet.nl> wrote in message
news:O%****************@TK2MSFTNGP09.phx.gbl... Geoff,
\\\ I made a new project I added to that a new project In that added project I changed in the properties the output type in the box general to "class library" Than I renamed the name of that form in that project to Geoff and the text of the form as well Than I did when I had again selected the first project, project -> add reference -> with a a reference to the second project I made an import to the second project on the form of the first project Than I made a load event with in that dim frm as new Geoff frm.showdialog Than I started debug And than I saw Geoff ////
Maybe gives this a lead
Cor
"Geoff Jones" <no********@email.com> Yes, but I couldn't see what to add
Geoff
"Cor Ligthert" <no************@planet.nl> wrote in message news:Od******************@TK2MSFTNGP12.phx.gbl... Geoff,
Did you try the project add references and than the "Project" tab?
I hope this helps?
Cor
"Geoff Jones" <no********@email.com>
Hi
I have two projects within a solution in Visual Studio .NET 2003. How do I access the code in one from the other? For example, there is a public member in one project. How can I call it from the other form? When I try to do this it says that the member is not declared.
Geoff
This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
by: Patchwork |
last post by:
Hi Everyone,
Please take a look at the following (simple and fun) program:
////////////////////////////////////////////////////////////////////////////
/////////////
// Monster Munch, example...
|
by: Proteus |
last post by:
Any help appreciated on a small perl project I need to write for
educator/teaching purposes. I have not programmed perl for some time, need
to get up to speed, maybe some kind souls hrere will help...
|
by: Raskolnikow |
last post by:
Hi!
I have a very simple problem with itoa() or the localtime(...).
Sorry, if it is too simple, I don't have a proper example.
Please have a look at the comments.
struct tm *systime;
time_t...
|
by: Peter |
last post by:
Hello
Thanks for reviewing my question. I would like to know how can I programmatically select a node
Thanks in Advanc
Peter
|
by: abcd |
last post by:
I am trying to set up client machine and investigatging which .net
components are missing to run aspx page.
I have a simple aspx page which just has "hello world" printed....
When I request...
|
by: dba_222 |
last post by:
Dear Experts,
Ok, I hate to ask such a seemingly dumb question, but I've
already spent far too much time on this. More that I
would care to admit.
In Sql server, how do I simply change a...
|
by: Giancarlo Berenz |
last post by:
Hi:
Recently i write this code:
class Simple
{
private:
int value;
public:
int GiveMeARandom(void);
|
by: galiorenye |
last post by:
Hi,
Given this code:
A** ppA = new A*;
A *pA = NULL;
for(int i = 0; i < 10; ++i)
{
pA = ppA;
//do something with pA
|
by: Phillip Taylor |
last post by:
Hi guys, I'm looking to develop a simple web service in VB.NET but I'm
having some trivial issues. In Visual Studio I create a web services
project and change the asmx.vb file to this:
Imports...
|
by: Chris M. Thomasson |
last post by:
I use the following technique in all of my C++ projects; here is the example
code with error checking omitted for brevity:
_________________________________________________________________
/*...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: nemocccc |
last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
| |