"Object reference not set to an instance of an object?"
This question already has an answer here:
You need to create a new instance of the form you want to display. You do this by creating a variable of form T and then showing it.
If you don't create an instance of your form the MainForm.Show()
code will be invoking Show()
on an null reference.
If PasswordTextBox.Text = pass Then
Me.Hide()
Dim theFormIWantToShow As New MainForm
theFormIWantToShow.Show()
End If
链接地址: http://www.djcxy.com/p/28044.html
下一篇: “你调用的对象是空的?”