日期:2014-05-19  浏览次数:21115 次

当前上下文中不存在名称“MessageBox”
using   System.Windows.Forms;
...
  MessageBox.Show( "Hello ");  

当前上下文中不存在名称“MessageBox” ?


------解决方案--------------------
就这些代码?
------解决方案--------------------
项目引用中添加System.Windows.Forms的引用
------解决方案--------------------
引用上点右键 "添加引用 ", ".net "中选择 "System.Windows.Forms "
如果再不行就重装一下framework
------解决方案--------------------
System.Windows.Forms.MessageBox.Show( "HELLO WORD ");
绝对可以
------解决方案--------------------
如楼上所说...
------解决方案--------------------
引用上点右键 "添加引用 ", ".net "中选择 "System.Windows.Forms "

然后再using System.Windows.Forms;