找回密码
 立即注册

QQ登录

只需一步,快速开始

[已处理] 出错了

jplzj
论坛元老   /  发表于:2012-9-11 20:52  /   查看:5066  /  回复:3
在运行了下面代码后出现的如图错误
FpSpread1.ActiveSheet.Cells(0, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.Solid), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(2, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.Dot), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(4, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.DashDot), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(6, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.DashDotDot), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(8, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.Dash), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(10, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.Custom), Nothing, Nothing)



        FpSpread1.ActiveSheet.Cells(12, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, FarPoint.Win.ComplexBorderSideStyle.SlantedDashDot), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(14, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, FarPoint.Win.ComplexBorderSideStyle.MediumDashDotDot), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(16, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, FarPoint.Win.ComplexBorderSideStyle.ThinLine), Nothing, Nothing)
        FpSpread1.ActiveSheet.Cells(18, 0).Border = New FarPoint.Win.ComplexBorder(Nothing, New FarPoint.Win.ComplexBorderSide(Color.Black, 2, Drawing2D.DashStyle.Dash), Nothing, Nothing)

未命名1.jpg

48.31 KB, 下载次数: 197

3 个回复

倒序浏览
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2012-9-12 11:40:00
沙发
应该是代码有点问题,ComplexBorderSide没有这个重载构造函数New FarPoint.Win.ComplexBorderSide(Color.Black, 2, FarPoint.Win.ComplexBorderSideStyle.SlantedDashDot),如果要在构造函数中使用ComplexBorderSideStyle,只能使用一下两个构造函数:
  1. ComplexBorderSide Constructor(ComplexBorderSideStyle,Color)
  2. ComplexBorderSide Constructor(ComplexBorderSideStyle)
复制代码
回复 使用道具 举报
jplzj
论坛元老   /  发表于:2012-9-12 12:31:00
板凳
系统应该提判断一下如果参数不对就应该提示。
回复 使用道具 举报
ZenosZeng讲师达人认证 悬赏达人认证
超级版主   /  发表于:2012-9-12 13:32:00
地板
因为这个参数是枚举类型,其值是0、1、2,所以,才参数的值只要是Int类型就不会报错。
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部