在win7下出现System.ArgumentException: 参数无效

slisongling 2013-11-18 10:02:01
System.ArgumentException: 参数无效。
在 System.Drawing.Image.get_Width()
在 System.Drawing.Image.get_Size()
在 System.Windows.Forms.PictureBox.ImageRectangleFromSizeMode(PictureBoxSizeMode mode)
在 System.Windows.Forms.PictureBox.OnPaint(PaintEventArgs pe)
在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
在 System.Windows.Forms.Control.WmPaint(Message& m)
在 System.Windows.Forms.Control.WndProc(Message& m)
在 QLFUI.MyTextBoxEx.uPictureBox.WndProc(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
在 System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
在 System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
...全文
648 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
slisongling 2013-11-18
  • 打赏
  • 举报
回复
只在win7出现这个错误 这个错误是不定时的出现 打开程序之后不会出现 要打开有文本框的界面 过一段时间就会出现
slisongling 2013-11-18
  • 打赏
  • 举报
回复
不是在Program 抛出的 运行是打开有文本框界面就会出现这个错误 文本框是用透明文本框
bdmh 2013-11-18
  • 打赏
  • 举报
回复
调试一下,要注意某些代码运行的时机,比如你在某些初始化就执行了某段代码或者事件(比如onpaint),但是其中用到了一些变量或参数还未初始化
  • 打赏
  • 举报
回复
你这个错误是在Program里的Application.Run这个方法中抛出的吗?
slisongling 2013-11-18
  • 打赏
  • 举报
回复
运行时错误 调试时候 那个错误红叉还是会出现 但是程序没有出错 代码还是运行正常 请问是什么问题???

110,537

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

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