net出现全局错误Screen-compatible bitmap cannot be created. The screen bitmap format ca

程爱动漫 2017-12-15 10:46:43
An error occurred creating the form. See Exception.InnerException for details. The error is: Creation of the ImageList handle did not succeed.4
Screen-compatible bitmap cannot be created. The screen bitmap format cannot be determined.
at System.Drawing.BufferedGraphicsContext.bFillBitmapInfo(IntPtr hdc, IntPtr hpal, BITMAPINFO_FLAT& pbmi)
at System.Drawing.BufferedGraphicsContext.CreateCompatibleDIB(IntPtr hdc, IntPtr hpal, Int32 ulWidth, Int32 ulHeight, IntPtr& ppvBits)
at System.Drawing.BufferedGraphicsContext.CreateBuffer(IntPtr src, Int32 offsetX, Int32 offsetY, Int32 width, Int32 height)
at System.Drawing.BufferedGraphicsContext.AllocBuffer(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
at System.Drawing.BufferedGraphicsContext.AllocBufferInTempManager(Graphics targetGraphics, IntPtr targetDC, Rectangle targetRectangle)
at System.Drawing.BufferedGraphicsContext.Allocate(IntPtr targetDC, Rectangle targetRectangle)
at System.Windows.Forms.Control.WmPaint(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
at System.Windows.Forms.ToolStrip.WndProc(Message& m)
at System.Windows.Forms.StatusStrip.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
...全文
683 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
程爱动漫 2018-01-01
  • 打赏
  • 举报
回复
引用 2 楼 hanjun0612 的回复:
哪一句报的异常? 感觉是初始化时,有参数没有初始化的问题。
问题已经解决,但是不明所以,出现这个错误的原因是我new了vb.net的窗体,而且是在主窗体中,运行半天会出现这个错误
正怒月神 2017-12-18
  • 打赏
  • 举报
回复
哪一句报的异常? 感觉是初始化时,有参数没有初始化的问题。
程爱动漫 2017-12-16
  • 打赏
  • 举报
回复
一顿自助,求解答

17,740

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 .NET Framework
社区管理员
  • .NET Framework社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧