如何在C#windows应用程序中将Form1.vb转换为Form1.cs文件 [英] How to convert Form1.vb to Form1.cs file in C# windows application

查看:90
本文介绍了如何在C#windows应用程序中将Form1.vb转换为Form1.cs文件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我打开我的视觉工作室 - > new ---> Project - >项目已创建。



我设计了注册页面,其中包含姓名,地址,手机,电子邮件等。我没有选择任何语言vb或C#.default它采取.vb.Now我想将相同的表单转换为.Cs文件。是否有可能?

I open my visual studio-->new --->Project--> project is created.

I designed the registration page with name,address,mobile,email like that. i did not select any language vb or C#.default it taken .vb.Now I want convert the same form into .Cs file. Is it possible or not?

推荐答案

创建一个新的C#项目并在设计器中打开一个新表单(所以你看的是控件,而不是代码) 。

现在在设计器中打开VB表单,然后选择所有控件。将它们复制到剪贴板。

返回C#表单并粘贴控件。

您必须再次创建所有事件处理程序,但如果您已经存在VB他们背后的代码,有在线代码转换器可能会有所帮助:

http: //www.developerfusion.com/tools/convert/vb-to-csharp/ [ ^ ]

http://converter.telerik。 com / [ ^ ]

Are我使用的两个。
Create a new C# project and open a new form in the designer (so you are looking at the controls, rather than the code).
Now open the VB form in the designer, and select all the controls. Copy them to the clipboard.
Go back the the C# form and paste the controls.
You will have to create all the event handlers again, but if you have existing VB code behind them, there are online code converters which may help:
http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]
http://converter.telerik.com/[^]
Are the two I use.


这篇关于如何在C#windows应用程序中将Form1.vb转换为Form1.cs文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆