2
Contributors
8
Replies
10
Views
4 Years
Discussion Span
Last Post by tinstaafl
0

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.

0

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

0

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.

Edited by tinstaafl

0

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.

This topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.