当我尝试编译项目时,我收到错误(BC30451)。这个错误是什么?

时间:2017-04-25 10:18:20

标签: vb.net

我收到错误(BC30451),我的代码,但我似乎无法弄清楚它是什么。我已经在这方面工作了一段时间,而且我无法编译它真的很烦人。

代码:

Imports System.Net
Imports System.Net.NetworkInformation

Public Class Login1

    Private Sub Label3_Click(sender As Object, e As EventArgs) Handles Label3.Click
        Me.Close()
    End Sub

    Private Sub Label4_Click(sender As Object, e As EventArgs) Handles Label4.Click
        Me.WindowState = FormWindowState.Minimized
    End Sub

    Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
        If My.Computer.Network.Ping("www.Google.com") Then

            MsgBox("Your Computer is currently connected to our database.", "Success!")
        Else

            MsgBox("Your Computer is currently not connected to our servers.", "Fatal Error")

        End If
    End Sub

    Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
        If TextBox8.Text = My.Settings.username AndAlso TextBox9.Text = My.Settings.password Then
            MsgBox("You have successfully been logged in!")
            Close()
            Main.Show()
        Else
            MsgBox("That username or password is incorrect, please try again.")
            Me.Close()
            Form1.Show()
        End If
    End Sub
End Class

Main.Show()中,它表示Main未声明,即使它是我正在使用的Visual Studio中的有效项目。

另外,出于某种原因,在'Main.vb'旁边,你应该得到的是一个蓝色标志,而不是正常的软件盒。这是一个截图:

image

0 个答案:

没有答案