views:

73

answers:

2

trying to get my first windows form running with controls. I havent been able to figure anything out. . . and then i realized duh, it's all in VB. How do I switch the generated files to C#? Am I confused? This is what I'm getting when I try to add my first control for Button_Start:

Public Class Form1

    Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load

    End Sub

    Private Sub Click_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button_Start.Click

    End Sub
End Class

Wow that was silly. I didn't realize there were multiple versions. Thanks!

+4  A: 

You need to create a C# Winforms project, not a VB Winforms project. If you're not using a full version of Visual Studio, but an Express version, then you need to download the C# Express version, and not use the VB Express version.

David Anderson
A: 

It looks like your project is currently a VB.NET WinForms project.

If you would like to convert your VB.NET code to C#, try an online code converter. There are lots out there, but perhaps try CarlosAG's code converter.

Simply add a new C# WinForms project to your solution, and copy/paste as needed!

p.campbell