Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Auto generate startup form #399

Closed
ShoodEver opened this issue Oct 27, 2019 · 2 comments
Closed

Auto generate startup form #399

ShoodEver opened this issue Oct 27, 2019 · 2 comments

Comments

@ShoodEver
Copy link

"VB -> C#: "

Input code

'Two errors:
' 1- in Application.Designer.vb
Protected Overrides Sub OnCreateMainForm()
            Me.MainForm = Global.WindowsApplication1.Form1
End Sub

'2- in Form1, cbo is ComboBox
Lblcolor.BackColor = Color.FromName(cbo.SelectedItem)

Erroneous output

' 1- error message: 'Form1' is a type, which is not valid in the given context
protected override void OnCreateMainForm()
        {
            MainForm = Form1;
        }

' 2- cannot convert from 'object' to 'string'
Lblcolor.BackColor = Color.FromName(cbo.SelectedItem);

Details

  • VS extension on Visual Studio 2017
  • Version in use: 7.0.0
    Attached full project in vb.net and C# converted
    vb.net_2_c.zip
@GrahamTheCoder
Copy link
Member

Thanks for getting in touch. The first issue is a specific (extreme) case of #375 so we'll track progress there.

The second issue you mentioned actually has been fixed in master (it was #365) but not released yet, so it will be in version 7.3 in a couple of weeks (or you can install a dev build from the ci system or a local build if you'd like to try it before then)

Yourexample will be a great test case. I'll close this issue and track the progress on those linked ones (I might rename them so they're easier to find, apologies for that!).

@ShoodEver
Copy link
Author

Thank you for your reply. I'll wait for the next version.
However, your extension is very helpful and helped me a lot
Thank you very much

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants