Click here to Skip to main content
15,890,418 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I'm a beginner of Visual C++.

I'm working on a project with another person.
Now I have to add her codes to mine, but when I chose to add existing items to my project and add her files, I couldn't see the design of a Windows Form.
There are only codes.

I can solve this problem by creating a new Windows Form and replacing the files with hers, but there are a lot of Windows Forms.

I can't do this.
In fact I tried a few, but for now the design of a Windows Form is no longer design but some XML codes.

I don't know why.
Posted
Updated 19-May-11 21:04pm
v2
Comments
Dalek Dave 20-May-11 3:05am    
Edited for Grammar, Spelling and Readability.

1 solution

Each form in v.2.0 and later spans at least two different files, using partial class feature. The developer could add some more files using this principle. One of these files is used for Designer-generated code. If you need to move existing files in different project, you need to move them all.

I've done it several times; it always worked for me. The structure of the project nodes could be lost (originally, auto-generated code goes as a child node of the other file's node; but after moving files into the project they may appear as peer nodes), but 1) even in this case the project is functionally good for further development, so you can ignore the problem; 2) you can fix the structure: create a simple project with one form, learn the syntax of these two file nodes and manually edit your project file in a text editor; be very careful; backup your project before this surgery.

A short advice related to the item (2) above: don't work without Revision Control System. Subversion or Git or Bazaar, etc. are wonderful reliable free products with full Open Source code.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900