在我用 C# 编码的应用程序中,我在解决方案资源管理器上右键单击我的项目,然后转到添加,然后选择 Windows 窗体并选择 Windows 窗体并按下确定!
然后我将我的表单命名为 MessageForm 而不是默认名称( Form2 )
现在在我的表单中我添加了一个按钮,我希望这个按钮在我点击它时向我显示另一个表单(MessageForm)所以我的代码是:
MessageForm Frm = new MessageForm();
Frm.Show();
但是有一个错误,我无法编译代码,因为我得到以下内容:
Error 1 The type or namespace name 'MessageForm' could not be found (are you missing a using directive or an assembly reference?)
这怎么可能?