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

Importing form GUI from another project

I need to import the Winform GUI from one project to another(with all the
controls).
Is there a simple way to copy&paste it or must I create every control by
hand

Regards
Ronny
Jul 13 '08 #1
5 5734
Hello Ronny,
I need to import the Winform GUI from one project to another(with all
the
controls).
Is there a simple way to copy&paste it or must I create every control
by
hand
Regards
Ronny
I think you can copy& paste, do you encounter any issues?

Thanks,
J.W.
Jul 13 '08 #2
On Sun, 13 Jul 2008 06:37:42 -0700, Ronny <ro***@giron.comwrote:
I need to import the Winform GUI from one project to another(with all the
controls).
Is there a simple way to copy&paste it or must I create every control by
hand
As J.W. say, you should be able to just copy/paste. Have you tried that?

That said, you may find that it makes more sense to factor the Form
sub-class out into a separate assembly and then reference it from whatever
projects you want to use it. You can use copy/paste in doing that as
well, but you may find it easier to just create a new empty project, copy
the source .cs files into the new project's directory (don't forget the
Designer file(s)), and then use the "Add Existing Item..." command to add
the source files to your empty project.

If you simply share the Form as a separate assembly, then when you find
and fix a bug while working on one project that uses it, you won't have to
go back and make the same fix to the other project that uses it. :)

Pete
Jul 13 '08 #3
Hello Ronny,

Right click on the solution --Add--Existing project inside Visual Stuido.

Or just compile you GUI project in dll and add the reference to it.

Kind regards,
Andrei Varanovich [C# MVP]
I need to import the Winform GUI from one project to another(with all
the
controls).
Is there a simple way to copy&paste it or must I create every control
by
hand
Regards
Ronny

Jul 13 '08 #4
Thanks,
Please note
1.the source project is an executable
2. my current project is a dll clas library
3. I can't simply add it to the project. I have to import its form and the
form controls.

Regards
Ronny


Jul 14 '08 #5
On Sun, 13 Jul 2008 22:41:40 -0700, Ronny <ro***@giron.comwrote:
Thanks,
Please note
1.the source project is an executable
You can add references to .exe files.
2. my current project is a dll clas library
Even in DLL projects.
3. I can't simply add it to the project. I have to import its form and
the
form controls.
Adding a reference to any executable (DLL or EXE) to some other project
will have the effect of importing all public classes in that executable
into the project to which the reference was added.

Not that I am actually suggesting you do it that way. But you could
follow Andrei's first suggestion if you wanted.

Obviously, I would follow my own advice (which is identical to Andrei's
second suggestion). Factor the form out into its own DLL project and
reference that DLL from any project in which you want to use the form
itself.

Pete
Jul 14 '08 #6

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

Similar topics

9
by: Edward S | last post by:
I budget for a Project in an Excel sheet as illustrated below. The months below are usually a 2 year period i.e. 24 months, though it could be over 24 months depending upon a Project. I then...
2
by: Sara | last post by:
Hi - I've been reading the posts for a solution to my query, and realize that I should ask an "approch" question as well. We receive our production data from a third party, so my uers import...
5
by: dixie | last post by:
If I sent a user an empty database container - dB with no tables and I needed them to import their tables into it and one of their tables was a hidden table with the prefix Usys, is there any way...
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...
4
by: Brian K. | last post by:
I am trying to split up and secure a database that we've been using on a network for a few years, following the procedure listed in Q304932 from microsoft. I create a new blank database for...
7
by: Timothy Shih | last post by:
Hi, I am trying to figure out how to use unmanaged code using P/Invoke. I wrote a simple function which takes in 2 buffers (one a byte buffer, one a char buffer) and copies the contents of the byte...
5
by: Howard Kaikow | last post by:
I have files to build a C project, including the makefile, what's the easiest way to import the project into C and C# in VS .NET Professional? I have both VS .NET 2002 and 2003. I have nothing...
0
by: Alun Jones | last post by:
I'm getting the above error in a dialog box from Visual Studio 2005 when trying to sign an assembly using a PFX file, and would like to know how to resolve the problem. Background: The PFX...
4
by: Mark | last post by:
Good morning. I recently made some changes to my Access project, and I introduced some problems that I could not resolve. So I deleted the forms that I had altered and saved the project. Then I...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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...
0
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...

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.