473,385 Members | 1,320 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,385 software developers and data experts.

Instantiate a form from another project

Hello,

I have a set of class library projects that are used by a Windows
application project. I would like to add forms that are specfic to those
class library projects and instantiate them from the windows application
project. Of course I can't add forms to my class library projects, however,
I'm apprehensive about changing those projects to windows application
projects.

Can anyone advise me on the various alternatives to accomplish what I'm
trying to do and what I lose/gain by changing my class library projects to
Windows application projects?

Thanks in advance!
Jack
Nov 21 '05 #1
3 1508
Jack,

FYI - You can include Form types in a class library.
--
Mike

Mike McIntyre
Visual Basic MVP
www.getdotnetcode.com
"jack" <ja***@systemsynergy.com.dumpthispart> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Hello,

I have a set of class library projects that are used by a Windows
application project. I would like to add forms that are specfic to those
class library projects and instantiate them from the windows application
project. Of course I can't add forms to my class library projects,
however, I'm apprehensive about changing those projects to windows
application projects.

Can anyone advise me on the various alternatives to accomplish what I'm
trying to do and what I lose/gain by changing my class library projects to
Windows application projects?

Thanks in advance!
Jack

Nov 21 '05 #2
"jack" <ja***@systemsynergy.com.dumpthispart> schrieb:
I have a set of class library projects that are used by a Windows
application project. I would like to add forms that are specfic to those
class library projects and instantiate them from the windows application
project. Of course I can't add forms to my class library projects,
however, I'm apprehensive about changing those projects to windows
application projects.


You can actually define form types in your class library. Then simply
reference the class library from your Windows Forms application (Windows
Forms applications cannot be referenced!), import the class library's
namespace and instantiate the forms defined in the class library.

--
M S Herfried K. Wagner
M V P <URL:http://dotnet.mvps.org/>
V B <URL:http://dotnet.mvps.org/dotnet/faqs/>

Nov 21 '05 #3
Thank you very much!

"jack" <ja***@systemsynergy.com.dumpthispart> wrote in message
news:Ok**************@TK2MSFTNGP12.phx.gbl...
Hello,

I have a set of class library projects that are used by a Windows
application project. I would like to add forms that are specfic to those
class library projects and instantiate them from the windows application
project. Of course I can't add forms to my class library projects,
however, I'm apprehensive about changing those projects to windows
application projects.

Can anyone advise me on the various alternatives to accomplish what I'm
trying to do and what I lose/gain by changing my class library projects to
Windows application projects?

Thanks in advance!
Jack

Nov 21 '05 #4

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

Similar topics

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...
10
by: Tom | last post by:
I am looking for some ideas for how to design the layout of the form for data entry and to display the data for the following situation: There are many sales associates. A sales associate can work...
6
by: Jason Shohet | last post by:
2 questions for anyone who can answer: 1. in class declarations, I realize you have to use the NEW keyword if you want to declare & instantiate some class at the same time. Whats an advantage...
1
by: Andreas Poller | last post by:
Hello, I have the following problem: I have a class deriving from ICustomTypeDescriptor: public __gc class TPropertyBag : public ICustomTypeDescriptor { private: ...
2
by: Sascha | last post by:
Hi there, I searched carefully through the web before finally deciding to post this message, because I could not find a solution for my problem. Hopefully someone will have a hint or explanation...
20
by: TM | last post by:
I have a form that I would like to use, with a few small code and control text changes, and was wondering if there was any way that I could somehow save another cop of the form so I can just import...
13
by: Brian | last post by:
I have many similar classes in a project, one for each type of report my app can create. I want to instantiate them based on a value passed in by a scheduler module. Right now I have Sub...
13
by: Lee Newson | last post by:
Hi, I have just written my first application using VB.NET. The app works fine when i am running it within .NET for debugging purposes, however when i try to run the app from the .exe file that...
3
by: garyusenet | last post by:
Dear Professionals, I have recently been using the wonderful krypton toolkit and am trying to use them in my small hobby application. I include this bit of info as an aside really because i'm...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
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...
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...

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.