C # and VB in C #

I have a C # and vb.net solution. I need to use a C # form inside a vb form as a tab. How can i do this?

+5
source share
4 answers

I did this by adding the .exe file of the VB project as a link in the C # project and named Form.Show () of the VB project.

+1
source

You can create one of the forms in a separate class library or as a user control in a separate class library and simply reference it from your application. Each project in your solution can be either VB.Net or C #, so it works in both directions ...

In a simple solution example, you can have the following projects

  • MyApp.CSharpControls - Project in C #
  • MyApp.VBControls - Project in Vb.Net
  • MyApp.UI - # VB.Net,

Edit
winforms??

+16

You will need Visual Studio Professional to do something like this.

Instead, I suggest you use this site to convert your C # .net to VB.net http://www.developerfusion.com/tools/convert/csharp-to-vb/

+6
source

No, you can not. I suggest encapsulating C # -Form in a separate assembly. Create a UserControl to use it inside another application, or if you need a full form, encapsulate it in a DLL and export the Show / ShowDialog () method.

+4
source

All Articles