尝试从方法中调用表单时出错:
表达式不是方法
我的代码结构如下所示:
Public Class frmMain
Class Server
Private Shared Sub StringMessageReceived()
Call frmMM()
End Sub
End Class
End Class
如何在课堂上调用Windows窗体?
答案 0 :(得分:2)
您创建表单的实例,然后调用其Show
(或ShowDialog
)方法:
Public Class frmMain
Class Server
Private Shared Sub StringMessageReceived()
Call New frmMM().Show()
End Sub
End Class
End Class