8
I have two different projects, one with only one form in C#, I can embed the form in my project in VB.NET ?
8
I have two different projects, one with only one form in C#, I can embed the form in my project in VB.NET ?
6
Are two options:
To open the C# form in VB.NET, if the two projects are in the same solution:
Dim csharpfrm As New ProjetoCSharp.Form1
csharpfrm.Show()
I am currently without Visual Studio, but to add the reference do the following: In the project with form C#, click on project >> options, and change the project type to dynamic library.
Compile the project (Build, build Solution, I don’t know how it looks in English).
Then, in the VB project, in the solution explorer, right-click the project, add, references, and find the file. dll in C#project folder, sub folder bin release.
More information here, but it’s in English. If this is a problem I will update the answer: http://www.vbforums.com/showthread.php?270506-How-to-call-C-form-from-a-VB.NET-form
I will test tonight, thank you @Rsinohara.
2
Create a project in the same solution in C# and another in VB, in C# puts your project, when using this C# project in VB, refer it to your project.
Browser other questions tagged c# .net vb.net visual-studio-2013
You are not signed in. Login or sign up in order to post.
Yes, you can. But not the form source code. You need to compile the C# project that has the form and then reference the generated Assembly in your VB project. Then you can use this form in the VB project just as you use any other class of the .Net Framework or any third party library.
– Caffé
Would you have a link or an explanation of how this reference is made? @Caffé
– marcelo_drummer