473,765 Members | 2,047 Online
Bytes | Software Development & Data Engineering Community
+ 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 1426
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****@discuss ions.microsoft. com> wrote in message
news:E6******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:E6******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:E6******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:F4******** *************** ***********@mic rosoft.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****@discuss ions.microsoft. com> wrote in message
news:E6******** *************** ***********@mic rosoft.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
5305
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 correct link, it's outdated. The link should be changed from this http://msdn.microsoft.com/library/default.asp?url=/downloads/list/netdevframework.asp to the new link, which is this:...
4
38882
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 for the data and Quest's (BTW this a very nice product) 'create like' function. That would work, but it seems a lot of work for something DB2 should know how to do.
1
2407
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 *same* name. I can add the database to the first host OK. But when I try to add the second host's database, I get an error saying "Database name already exists." Is there a way around this problem? Why does it matter if databases
8
1936
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 folders are actually created in the Solution Explorer so that I can find things easily. Its easy to select multiple files out of a single folder, but not recursively into subfolders. Any ideas? -- Adam Clauss
1
1497
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
2595
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 unicode string? cutdown example: $ cat ./uc.py #!/usr/bin/env python imported="\304\246\311\231\316\257\316\271\303\222
0
1527
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
1556
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 Beta2 I think VS.NET 2008 is worth the upgrade. But I want to hold off(five+ years depending on features) on more further upgrades OSs & ISEs cause of too many releases - too soon - too much money.... So now going to VS.NET 2008 I want to setup a...
0
1528
by: harley1591 | last post by:
JEWEL QUEST crack http://cracks.00bp.com F R E E
0
9399
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10163
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10007
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
9957
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
9835
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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8832
agi2029
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
6649
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5423
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3924
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

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.