-- 作者:gaoyong30000
-- 发布时间:2012/12/31 17:47:00
-- [求助]drawcell事件出现了一个问题!!!
代码出错,drawcell代码如下: Select Case e.Col.name Case "合" If e.Row("合") = 1 e.StartDraw() e.Graphics.DrawImage(contract, e.x + 3, e.y + 3) e.Style = "a" e.EndDraw() End If Case "详" e.StartDraw() e.Graphics.DrawImage(clerk, e.x + 3, e.y + 3) e.EndDraw() Case "调" If e.Row("调") = 1 Then e.StartDraw() e.Graphics.DrawImage(transfer, e.x + 3, e.y + 3) e.Style = "a" e.EndDraw() End If Case "离" If e.Row("离") = 1 Then e.StartDraw() e.Graphics.DrawImage(lizhi, e.x + 3, e.y + 3) e.Style = "a" e.EndDraw() End If End Select
此主题相关图片如下:1.jpg
.NET Framework 版本:2.0.50727.3643 Foxtable 版本:2012.11.28.1 错误所在事件:表,人事档案_人事档案Table1,DrawCellEdit 详细错误信息: System.Reflection.TargetInvocationException: 调用的目标发生了异常。 ---> System.ArgumentNullException: 值不能为空。 参数名: image 在 System.Drawing.Graphics.DrawImage(Image image, Int32 x, Int32 y) 在 UserCode.DrawCell(DrawCellEventArgs e) --- 内部异常堆栈跟踪的结尾 --- 在 System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) 在 System.RuntimeMethodHandle.InvokeMethodFast(Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner) 在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks) 在 System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) 在 Foxtable.O10000Ol1lllO0.O0l1O1lO110l1l10(Object O01l1l, OwnerDrawCellEventArgs O, Boolean O0Olll001O01111O101OO, Boolean O0101O0)
|