473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Reference to a form in another project

Hello,
My C# solution is composed of 2 projects, a class library project and a
Windows application project. The window in one project calls the DLL in the
other. That's ok.

Now, to better test the solution I would like to create a new Windows
application project in that solution so that my 2 other projects are not
impacted by this third project. Now this new project would contain the
startup Form from which I could open my Form in the previous project or call
the DLL directly.

My problem is that I don't know how to show a form from another project of
the solution since it is possible to add a reference to a project only for
DLLs.

Summary:
SolutionA contains
- Project1 (Form1)
- Project2 (DLL)
- Project3 (Form2)

How can I make Form2 opens Form1?

Thanks,
David.
Jul 21 '05 #1
1 2177
Hello David,

A dll project can contain a windows form. There is nothing wrong with that.
It is not trivial to change a Windows EXE project into a dll project. On
the other hand, it is quite easy to simply create a new DLL project and add
an Existing Item to it, and point to the windows form that you created for
your Windows EXE. Once you have all the code from the EXE project, then
simply delete the original project from your solution.

Now, you have two DLLs. When you add your new windows EXE, you can make a
reference to both.

--- Nick

"David Gagné" <ga*********@sympatico.ca> wrote in message
news:uN**************@TK2MSFTNGP09.phx.gbl...
Hello,
My C# solution is composed of 2 projects, a class library project and a
Windows application project. The window in one project calls the DLL in the other. That's ok.

Now, to better test the solution I would like to create a new Windows
application project in that solution so that my 2 other projects are not
impacted by this third project. Now this new project would contain the
startup Form from which I could open my Form in the previous project or call the DLL directly.

My problem is that I don't know how to show a form from another project of
the solution since it is possible to add a reference to a project only for
DLLs.

Summary:
SolutionA contains
- Project1 (Form1)
- Project2 (DLL)
- Project3 (Form2)

How can I make Form2 opens Form1?

Thanks,
David.

Jul 21 '05 #2

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

Similar topics

1
by: M Shafaat | last post by:
Hi! I have made a user control called, say "MyUserCtrl", which is inherited from another user defined class called, say "MyBaseClass". Each one of these two are developed in its own project. ...
0
by: PABLIN | last post by:
Add a reference Web to a project Service Web ASP.NET that I created previously: in the Explorer of solutions, I do click with the secondary button of mouse in the AuthorsWinClient project and...
2
by: Suzanne | last post by:
Hi all, I'm reposting this message as I'm experiencing this problem more and more frequently : I really hope someone out there can help me as I've been tearing my hair out on this one for a...
1
by: Nicolas | last post by:
I got an exe which include a form MDI ===> FORM A I got another dll wich include a form =====> FORM B In my FORM A I can launch FORM B and assign FORM B.MdiParent = FORM A But from FORM B I...
2
by: Jeff | last post by:
I'm getting an Object Reference error before I even run my app, and I'm not sure where to look to find the cause. I'd appreciate your help. When I open my Windows Application project, the...
1
by: Thief_ | last post by:
I have two projects in one solution: a.. Outlook Monitor b.. Tray Notification Both contain a form called "Form1.vb". How do I reference "Outlook Monitor"'s Form1 from "Tray Notification"'s...
1
by: David Gagné | last post by:
Hello, My C# solution is composed of 2 projects, a class library project and a Windows application project. The window in one project calls the DLL in the other. That's ok. Now, to better test...
6
by: liu | last post by:
Hi all, in my vb.net solution, i have 3 project: 1. Main-this is the startup or the base of my window application. 2. Sales-this is the project that contains all the sales info 3. Product-this...
0
by: SammyBar | last post by:
Hi all, My problem is basic. I'm starting to try web services with Visual Studio .NET 2002, .NET Framework 1.0. I'm testing the following configuration for my project. It's a ASP.NET Web Service...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
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...
0
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
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
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
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,...

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.