Visual Basic 错误 BC30456 'Form1' 不是 'WindowsApplication1' 的成员 [英] visual basic error BC30456 'Form1' is not a member of 'WindowsApplication1'

查看:67
本文介绍了Visual Basic 错误 BC30456 'Form1' 不是 'WindowsApplication1' 的成员的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,我正在尝试做一个练习,但在编译时不断出现此错误.

Hello I am trying to do an exercise and keep getting this error when compiling.

Visual Basic 错误 BC30456Form1"不是WindowsApplication1"的成员

Visual Basic error BC30456 'Form1' is not a member of 'WindowsApplication1'

我不知道如何解决它.

下面是我的代码:

Public Class frmCentsConverter
    Private Sub txtAmount_TextChanged(sender As Object, e As EventArgs) Handles txtAmount.TextChanged
        If IsNumeric(txtAmount.Text) Then
            Dim NumberofCents As Integer

            NumberofCents = CInt(txtAmount.Text)
            lblDollars.Text = CStr(NumberofCents \ 100)
            lblCents.Text = CStr(NumberofCents Mod 100)
        End If
    End Sub

    Private Sub lblTitle_Click(sender As Object, e As EventArgs) Handles lblTitle.Click

    End Sub
End Class

推荐答案

如果您重命名了启动表单 1,则可能还需要更改启动表单设置.您可以找到此设置以在解决方案资源管理器"中打开我的项目".选择应用程序"部分,根据需要更改启动表单".

If you have renamed the startup form1 it is likely you also have to change the Startup form setting. You can find this setting to open 'My Project' in the 'Solution Explorer'. Select the Application section, change the 'startup form' as appropriate.

希望这会有所帮助,哈里

Hope this will help, Harrie

这篇关于Visual Basic 错误 BC30456 'Form1' 不是 'WindowsApplication1' 的成员的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆