您好我正在尝试进行练习并在编译时不断收到此错误.
Visual Basic错误BC30456'Form1'不是'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
Run Code Online (Sandbox Code Playgroud)
如果您已重命名启动form1,则可能还需要更改"启动"表单设置.您可以在"解决方案资源管理器"中找到此设置以打开"我的项目".选择"应用程序"部分,根据需要更改"启动表单".
哈利,希望这会有所帮助
小智 5
在 Windows 窗体中设置启动窗体
我从这个网站得到了这个信息:
https://msdn.microsoft.com/library/a2whfskf(v=vs.100).aspx
我可以确认这也适用于 Visual Studio 2015。