Hello i am doing a WOW launcher but i wanted to switch from vB.net to C# so i used this converter http://www.developerfusion.com/tools/convert/vb-to-csharp/?batchId=afeaecee-b774-436c-a04a-97009e64a2bb

but i getting some errors
http://pastebin.com/enQ1s414

My code
http://pastebin.com/F9CnGyKp

I hope you guys might help me :) btw do not care about that missing GUI things just that Me.** and interact thing

Recommended Answers

All 8 Replies

looks like mostly you'll need to add

        using System.Windows.Forms;

then use

        Application.ExecutablePath

instead of

        My.Application.Info.DirectoryPath.ToString

and

        using System.IO;
        File.WriteAllText(

instead of

        My.Computer.FileSystem.WriteAllText(

and

        MessageBox.Show(

instead of

        Interaction.MsgBox(

and

        MessageBoxButtons.OK

instead of

        MsgBoxStyle.Information
        MsgBoxStyle.Critical

I think that handles most of the errors.

Thanks :)
ill see Tommorow if it fixs it

Could someone help me with the last lines thats also broken :/

Not sure what your trying to do there. can you show that line of the VB code you're converting from?

erase lines 139-142

erase lines 139-142. Now you have to make sure the form knows to run the Form1_Load routine, if the conversion software misinterpreted what that routine is for then it probably didn't handled it right. But the easiest way, is to let VS do it for you. Copy the code inside the routine and delete that routine. now go to the form in the design window and double click on an empty spot of the form. This starts a new sub routine and registers it so the form will run it when the form loads. Now paste your code into this new routine. I know it looks like you've just made the same routine, and you have, the difference is behind the code.

oooops, my bad. You need most of those lines. just replace line 141 with InitializeComponent();, but if the routine in Form1_Load doesn't run then follow the rest of my above instructions.

Again my apologies.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.