开发记事本

生命中闪过了多少if...then...else...

  博客园  :: 首页  :: 新随笔  :: 联系 :: 订阅 订阅  :: 管理

我使用的是Win2003 Standard Server + VS.Net 2003,最近发现在VS.Net中DataGrid无法使用,总是显示一个“创建控件时出错”的错误提示(见附图),开始怀疑是VS.Net 2003的问题,后来把VS.Net卸载后重装,问题依旧,试着使用SharpDeveloper,发现根本就无法创建Form,只要一创建就会提示一大堆如下所示的错误信息:

System.NullReferenceException: Object reference not set to an instance of an object.
   at ICSharpCode.SharpDevelop.FormDesigner.FormKeyHandler.PreFilterMessage(Message& m)
   at System.Windows.Forms.ThreadContext.System.Windows.Forms.UnsafeNativeMethods+IMsoComponent.FPreTranslateMessage(MSG& msg)
   at System.Windows.Forms.ComponentManager.System.Windows.Forms.UnsafeNativeMethods+IMsoComponentManager.FPushMessageLoop
(Int32 dwComponentID, Int32 reason, Int32 pvLoopData)
   at System.Windows.Forms.ThreadContext.RunMessageLoopInner(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.ThreadContext.RunMessageLoop(Int32 reason, ApplicationContext context)
   at System.Windows.Forms.Application.RunDialog(Form form)
   at System.Windows.Forms.Form.ShowDialog(IWin32Window owner)
   at System.Windows.Forms.Form.ShowDialog()
   at ICSharpCode.SharpDevelop.SharpDevelopMain.ShowErrorBox(Object sender, ThreadExceptionEventArgs eargs)
   at System.Windows.Forms.ThreadContext.OnThreadException(Exception t)
   at System.Windows.Forms.Control.WndProcException(Exception e)
   at System.Windows.Forms.ControlNativeWindow.OnThreadException(Exception e)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.UnsafeNativeMethods.SendMessage(HandleRef hWnd, Int32 msg, IntPtr wParam, IntPtr lParam)
   at System.Windows.Forms.Control.SendMessage(Int32 msg, IntPtr wparam, IntPtr lparam)
   at System.Windows.Forms.Control.ReflectMessageInternal(IntPtr hWnd, Message& m)
   at System.Windows.Forms.Control.WmCommand(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
   at System.Windows.Forms.ContainerControl.WndProc(Message& m)
   at System.Windows.Forms.ParkingWindow.WndProc(Message& m)
   at System.Windows.Forms.ControlNativeWindow.OnMessage(Message& m)
   at System.Windows.Forms.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

我怀疑是Framework损坏,但是运行dotnetfx.exe重新安装时提示“您尝试安装的产品已经随操作系统一起安装到计算机上,请使用Update安装最新的更新”

现在我该怎么办?除了重装系统还有什么办法吗

 click for full size

posted on 2004-04-25 10:27  NetCobra  阅读(3625)  评论(3编辑  收藏  举报