开发者

VB.NET 2008 importing forms from another project?

开发者 https://www.devze.com 2022-12-16 02:39 出处:网络
I have some form/vb in another project that I want to import to a 开发者_开发百科new one. There are three files with these extensions - .vb, resx, and designer.vb. Which do I copy and how exactly? If

I have some form/vb in another project that I want to import to a 开发者_开发百科new one. There are three files with these extensions - .vb, resx, and designer.vb. Which do I copy and how exactly?


If you are copying the files outside of Visual Studio (e.g. in Windows Explorer) you need to copy all three.

But working in Visual Studio you only need to copy the base .vb file; the .designer.vb and the .resx will be copied for you automatically. How to do this? Right click on your project file in Solution Explorer and choose Add -> Existing Item.


You need to copy all the files. You should even be able to open two instances of Visual Studio and drag and drop the form from one to the other.

Once you do the copy you'll probably want to change the namespaces and/or type names inside the files because they might be pointing to names from the previous project.


You need to copy all files over. If you copy and paste them using the file system, in Visual Studio Solution Explorer they won't appear. You will need to "show all" files. Then everything in the project directory is shown allowing you to right-click them and "include" them in your project.

0

精彩评论

暂无评论...
验证码 换一张
取 消