打开表单时对非共享成员的引用需要对象引用错误 [英] Reference to a non-shared member requires an object reference Error When Opening Form
本文介绍了打开表单时对非共享成员的引用需要对象引用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
尝试在 Visual Basic 中打开表单时出现以下错误
I got the following error when Trying to Open a Form in Visual Basic
Error 1 Reference to a non-shared member requires an object reference. c:\users\alex96\documents\visual studio 2013\Projects\Home Work Calendar\Home Work Calendar\StartUp.vb 25 13 Home Work Calendar
这是我用来打开表单的代码(不工作的行)
and Here is the code I used to open the form (the not working line)
frmCourses.Show()
通常,这会奏效,但现在不行,我认为我在创建其他表单时没有做任何不同的事情
Normally, this would work, but now it isn't and I don't think I did anything different when creating the other form
推荐答案
创建对象的实例.
Dim xForm as new frmCourses
xForm.Show
这篇关于打开表单时对非共享成员的引用需要对象引用错误的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文