以文本方式查看主题

-  Foxtable(狐表)  (http://www.foxtable.com/bbs/index.asp)
--  专家坐堂  (http://www.foxtable.com/bbs/list.asp?boardid=2)
----  最近老是弹出这种错误  (http://www.foxtable.com/bbs/dispbbs.asp?boardid=2&id=135823)

--  作者:rjh4078
--  发布时间:2019/6/3 22:56:00
--  最近老是弹出这种错误
有关调用实时(JIT)调试而不是此对话框的详细信息,
请参见此消息的结尾。

************** 异常文本 **************
System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.ComponentModel.Win32Exception: 当前程序已使用了 Window 管理器对象的系统允许的所有句柄。
   在 System.Drawing.Icon.Initialize(Int32 width, Int32 height)
   在 System.Drawing.Icon..ctor(SerializationInfo info, StreamingContext context)
   --- 内部异常堆栈跟踪的结尾 ---
   在 System.RuntimeMethodHandle._SerializationInvoke(Object target, SignatureStruct& declaringTypeSig, SerializationInfo info, StreamingContext context)
   在 System.Reflection.RuntimeConstructorInfo.SerializationInvoke(Object target, SerializationInfo info, StreamingContext context)
   在 System.Runtime.Serialization.ObjectManager.CompleteISerializableObject(Object obj, SerializationInfo info, StreamingContext context)
   在 System.Runtime.Serialization.ObjectManager.FixupSpecialObject(ObjectHolder holder)
   在 System.Runtime.Serialization.ObjectManager.DoFixups()
   在 System.Runtime.Serialization.Formatters.Binary.ObjectReader.Deserialize(HeaderHandler handler, __BinaryParser serParser, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   在 System.Runtime.Serialization.Formatters.Binary.BinaryFormatter.Deserialize(Stream serializationStream, HeaderHandler handler, Boolean fCheck, Boolean isCrossAppDomain, IMethodCallMessage methodCallMessage)
   在 System.Resources.ResourceReader.DeserializeObject(Int32 typeIndex)
   在 System.Resources.ResourceReader.LoadObjectV2(Int32 pos, ResourceTypeCode& typeCode)
   在 System.Resources.ResourceReader.LoadObject(Int32 pos, ResourceTypeCode& typeCode)
   在 System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase, Boolean isString)
   在 System.Resources.RuntimeResourceSet.GetObject(String key, Boolean ignoreCase)
   在 System.Resources.ResourceManager.GetObject(String name, CultureInfo culture, Boolean wrapUnmanagedMemStream)
   在 System.Resources.ResourceManager.GetObject(String name, CultureInfo culture)
   在 Foxtable.My.Resources.a.O  oo OO()
   在 Foxtable.o_OoO_O_.O00  0  (Object A_0, OwnerDrawCellEventArgs A_1, Boolean A_2, Boolean A_3, Boolean& A_4)
   在 Foxtable.o_OoO_O_.o0  OO  (Object A_0, OwnerDrawCellEventArgs A_1)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.OnOwnerDrawCell(OwnerDrawCellEventArgs e)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.#gdb(OwnerDrawCellEventArgs #tQ)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.#fdb(Graphics #AA, Int32 #j, Int32 #l, Style #aE, Rectangle #o5, String #gM, Image #Ak)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.DrawCell(Graphics #AA, Int32 #j, Int32 #l, Style #aE, Rectangle #o5, String #gM, Image #Ak, CheckEnum #bdb)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.DrawCell(PaintEventArgs e, Int32 row, Int32 col)
   在 C1.Win.C1FlexGrid.C1FlexGrid.DrawCell(PaintEventArgs e, Int32 row, Int32 col)
   在 C1.Win.C1FlexGrid.C1FlexGrid.DrawRow(PaintEventArgs e, Int32 row)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.#adb(PaintEventArgs #tQ)
   在 C1.Win.C1FlexGrid.C1FlexGridBase.OnPaint(PaintEventArgs e)
   在 System.Windows.Forms.Control.PaintWithErrorHandling(PaintEventArgs e, Int16 layer)
   在 System.Windows.Forms.Control.WmPaint(Message& m)
   在 System.Windows.Forms.Control.WndProc(Message& m)
   在 C1.Win.C1FlexGrid.Util.BaseControls.ScrollableControl.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)


--  作者:有点蓝
--  发布时间:2019/6/3 23:02:00
--  
是不是在drawcell事件里绘图,然后没有释放图片占用的内存
--  作者:有点甜
--  发布时间:2019/6/4 10:09:00
--  

 

做什么操作的时候出现的错误?

 

 


--  作者:rjh4078
--  发布时间:2019/6/4 10:14:00
--  
我是有个drawcell事件  代码如下  每次打开这个表 有时候正常  有时候就会被叉掉

If e.Row.Isnull("合同号")=False Then
    e.Table.DataTable.AddUserStyle("red",color.white,Color.red)
    e.Style="red"
    
End If

--  作者:有点甜
--  发布时间:2019/6/4 11:15:00
--  

1、做什么操作的时候出现的错误?

 

2、不写drawcell事件,是否还报错?


--  作者:rjh4078
--  发布时间:2019/6/4 15:22:00
--  
这个表是关联子表 放在窗口里 每次打开窗口的时候就会突然报错 然后表被X掉  没规律
--  作者:有点甜
--  发布时间:2019/6/4 15:41:00
--  
以下是引用rjh4078在2019/6/4 15:22:00的发言:
这个表是关联子表 放在窗口里 每次打开窗口的时候就会突然报错 然后表被X掉  没规律

 

1、能否每次都报错?无法重复还原报错?

 

2、如果把表删除,或者把对应的代码删除,是否还报错?