473,725 Members | 2,126 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

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 5764
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.co mwrote:
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.co mwrote:
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
4035
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 need to input this in an Access database, where I do a comparison with the Actual cost. The table “TblBudget” in Access is made of 4 fields, namely: (1) CostElement (2) CostCenter (3) Month (4) Amount$. At the moment this method is very cumbersome....
2
2316
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 the data from Excel into the appropriate tables. There are 6 different databases that receive data, though 4 of them only get one table each. I have learned how to automate the data import through
5
3180
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 in code I can get that table imported without them having to go to options and show hidden tables and then import it manually? dixie
10
2884
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 for multiple companies and work for multiple divisions within each company. Within each division he can work in multiple departments and within each department he can work with multiple groups. In each group he works on multiple projects. All the...
4
5154
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 the front end, and am able to import tables and link from the backend. Queries come in ok too. When I tried to import Modules, forms, and reports, most of them failed with the error: "File Not Found:...
7
3306
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 buffer into the character pointer. The code looks like the following: #include <stdio.h> #include <stdlib.h> #include "stdafx.h" BOOL APIENTRY DllMain( HANDLE hModule, DWORD ul_reason_for_call,
5
1516
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 but VB .NET books. I guess it's time to get a book for each of C++ and C# in .NET. Any recommendations -- http://www.standards.com/; See Howard Kaikow's web site.
0
489
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 file has been used for code-signing before (to sign an InfoPath form), so therefore the file contains a valid code-signing key. I have the correct password to the PFX file (because I get a different error
4
2256
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 opened my backup copy of the project, and exported the affected forms to the working copy. Now when I invoke any event procedures in the affected forms, I receive the following error (this example is for a click event):
0
8752
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
9401
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
9257
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
9176
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,...
1
6702
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4519
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
4784
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2635
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2157
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 can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.