473,486 Members | 2,476 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Easy - VS Project Ref. Quest

How do I reference a WinForm file (i.e. Class) in Project B from a WinForm
file in Project A?

I've previously used
Tutorial: Creating C# Class Library (DLL) Using Visual Studio .NET
http://www.c-sharpcorner.com/2/pr12.asp
to create a dll reference for Project A but how do you reference a form in
one project to another form in another project?

**************

using Project B

Project_A_ CTR()
{
Form1 form1= new Form1(); //Project B Class
}

Projects A and B appear in the respective Add Reference -- Projects window
Nov 16 '05 #1
4 1409
You cannot because both are applications (.EXE) and VS.NET does not
supporting the reference of executables. You will need to place the forms
in a library which can then be referenced by applications.

"Steve B." <St****@discussions.microsoft.com> wrote in message
news:E6**********************************@microsof t.com...
How do I reference a WinForm file (i.e. Class) in Project B from a WinForm
file in Project A?

I've previously used
Tutorial: Creating C# Class Library (DLL) Using Visual Studio .NET
http://www.c-sharpcorner.com/2/pr12.asp
to create a dll reference for Project A but how do you reference a form in
one project to another form in another project?

**************

using Project B

Project_A_ CTR()
{
Form1 form1= new Form1(); //Project B Class
}

Projects A and B appear in the respective Add Reference -- Projects window

Nov 16 '05 #2

Thank You Peter - can you explain a llittle more

I have simple ADONet forms for various simple and relational dB's. Each
ADONet form actuates other Add, Delete Forms fo the dB and then one top level
form which has buttons for all the ADONet forms . If I put them all in one
project there is a mess of many disorganized files (datasets, etc)

So if I understand what your saying do I somhow make dll's out of the ADONet
forms and then reference the dll in that top level application??

Steve

"Peter Rilling" wrote:
You cannot because both are applications (.EXE) and VS.NET does not
supporting the reference of executables. You will need to place the forms
in a library which can then be referenced by applications.

"Steve B." <St****@discussions.microsoft.com> wrote in message
news:E6**********************************@microsof t.com...
How do I reference a WinForm file (i.e. Class) in Project B from a WinForm
file in Project A?

I've previously used
Tutorial: Creating C# Class Library (DLL) Using Visual Studio .NET
http://www.c-sharpcorner.com/2/pr12.asp
to create a dll reference for Project A but how do you reference a form in
one project to another form in another project?

**************

using Project B

Project_A_ CTR()
{
Form1 form1= new Form1(); //Project B Class
}

Projects A and B appear in the respective Add Reference -- Projects window


Nov 16 '05 #3
can I reference a "real" dll from a Adonet type form dll ?

"Peter Rilling" wrote:
You cannot because both are applications (.EXE) and VS.NET does not
supporting the reference of executables. You will need to place the forms
in a library which can then be referenced by applications.

"Steve B." <St****@discussions.microsoft.com> wrote in message
news:E6**********************************@microsof t.com...
How do I reference a WinForm file (i.e. Class) in Project B from a WinForm
file in Project A?

I've previously used
Tutorial: Creating C# Class Library (DLL) Using Visual Studio .NET
http://www.c-sharpcorner.com/2/pr12.asp
to create a dll reference for Project A but how do you reference a form in
one project to another form in another project?

**************

using Project B

Project_A_ CTR()
{
Form1 form1= new Form1(); //Project B Class
}

Projects A and B appear in the respective Add Reference -- Projects window


Nov 16 '05 #4
You can organize it however you want. But if you have common components,
then maybe just create one project that has them all (which would be a DLL),
then you can reference them anywhere. You can create a separate VS.NET
project for each form if that is the best organization.

"Steve B." <St****@discussions.microsoft.com> wrote in message
news:F4**********************************@microsof t.com...

Thank You Peter - can you explain a llittle more

I have simple ADONet forms for various simple and relational dB's. Each
ADONet form actuates other Add, Delete Forms fo the dB and then one top
level
form which has buttons for all the ADONet forms . If I put them all in
one
project there is a mess of many disorganized files (datasets, etc)

So if I understand what your saying do I somhow make dll's out of the
ADONet
forms and then reference the dll in that top level application??

Steve

"Peter Rilling" wrote:
You cannot because both are applications (.EXE) and VS.NET does not
supporting the reference of executables. You will need to place the
forms
in a library which can then be referenced by applications.

"Steve B." <St****@discussions.microsoft.com> wrote in message
news:E6**********************************@microsof t.com...
> How do I reference a WinForm file (i.e. Class) in Project B from a
> WinForm
> file in Project A?
>
> I've previously used
> Tutorial: Creating C# Class Library (DLL) Using Visual Studio .NET
> http://www.c-sharpcorner.com/2/pr12.asp
> to create a dll reference for Project A but how do you reference a form
> in
> one project to another form in another project?
>
> **************
>
> using Project B
>
> Project_A_ CTR()
> {
> Form1 form1= new Form1(); //Project B Class
> }
>
> Projects A and B appear in the respective Add Reference -- Projects
> window
>
>


Nov 16 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5264
by: pbj | last post by:
my application was created in vb.net, vs 2003. the setup project was also created in vs 2003. one of my application reviewers reported this: The .Net link that is included in the setup is not the...
4
38826
by: Robert Stearns | last post by:
For testing purposes I propose to add a schema (testing, how original) and would like to copy some of my live tables to it, both structure and data. I know I could use something like dump/restore...
1
2384
by: Trent | last post by:
Hello, I was wondering if anyone here could help with a Quest Central issue. I have two different hosts listed in Quest Central. Each host has a database on it, but the databases have the...
8
1922
by: Adam Clauss | last post by:
I have a folder containing many subfolders (and subfolders and....) all containing various .cs files. Is there any "easy" way to get them all added to the solution. Preferable would be that the...
1
1486
by: x taol | last post by:
tbl1..... fPum p1 p2 p3 ======================== tbl2....... fNum fDate fGoods fIn fOut fStock 1 5/6 p1 9 1 8 2 5/7 p2 7 3 4
1
2565
by: NevilleDNZ | last post by:
Hi, Apologies first as I am not a unicode expert.... indeed I the details probably totally elude me. Not withstanding: how can I convert a binary string containing UTF-8 binary into a python...
0
1515
by: Piero 'Giops' Giorgi | last post by:
Hi! I'm testing SQL Turbo (From Quest Software) Any of you guys ever used it? Impressions? Advice? P
4
1534
by: bj7lewis | last post by:
I am currently C++/Win32/MFC & C# programmer using VS.NET 2002 and jumped into VS.NET 2003 but that was a waste so I skipped VS.NET 2005 cause buying VS.NET 2003. Now after checking out VS.NET 2008...
0
1516
by: harley1591 | last post by:
JEWEL QUEST crack http://cracks.00bp.com F R E E
0
7105
marktang
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,...
0
6967
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...
0
7132
Oralloy
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,...
0
7341
tracyyun
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...
0
4564
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3076
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3071
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
600
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
266
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.