can't open clipboard 这个错误是什么原因?

dongliang110 2007-11-13 10:59:17
我在使用TcxSpreadSheetBook控件向excel中写数据时在有一台机器上有时会报can't open clipboard 错误。
现在也找不出是程序的错误还是用户机器上的问题,大概有20个客户使用这套软件,只有一台机器上总出现这种问题,机器重装后偶尔也会出现错误。xp的剪切板可以设置吗?
这是报错地方的代码。
 //拷贝表头代码。
 if ipage>1 then
begin
with cxSpreadBook.ActiveSheet do
begin
selectionRect:=rect(0,0,14,59);
Copy(cxspreadBook.activeSheet.selectionrect,false);
end;
end;
if ipage>1 then
for i:=2 to ipage do
begin
//复制格式
with cxSpreadBook.ActiveSheet do
begin
SelectCell(0, 62*(i-1) );
Paste(cxspreadbook.ActiveSheet.SelectionRect.TopLeft);
//设置行高 ggy 0523
for j:=0 to 59+2 do
cxspreadbook.ActiveSheet.Rows.Size[62*(i-1)+j]:= cxspreadbook.ActiveSheet.Rows.Size[j];

end;
end;
...全文
2903 6 打赏 收藏 转发到动态 举报
AI 作业
写回复
用AI写文章
6 条回复
切换为时间正序
请发表友善的回复…
发表回复
dongliang110 2007-11-16
  • 打赏
  • 举报
回复
谢谢各位的支持,try捕捉的错误就是can 't open clipboard 这个提示,我现在也搞不明白是什么原因,在客户的机器上不能调试,还不是全部 的机器都有问题,只有一台机器上有问题,机器重装后就没有了,不过运行一段时间有时又什么出现。
zzn007 2007-11-14
  • 打赏
  • 举报
回复
剪贴板出现问题了,可能是你复制过程中没有选中,或者是操作延时等导致数据还没有复制进剪贴板,或者复制过程中出现以外错误等,应该添加try来捕捉看看
fjwyq 2007-11-14
  • 打赏
  • 举报
回复
路过,帮顶
Bear_hx 2007-11-13
  • 打赏
  • 举报
回复
找一下剪贴板的资料,应该是剪贴板出错了,看它的电脑能不能手工复制粘贴。
ly_liuyang 2007-11-13
  • 打赏
  • 举报
回复
这类问题说不清楚的
Try 来处理,有问题再重试就是的
hsmserver 2007-11-13
  • 打赏
  • 举报
回复
看不出什么问题
手工操作试试
Version 1.7 ----------- - ADD: Delphi/CBuilder 10.2 Tokyo now supported. - ADD: Delphi/CBuilder 10.1 Berlin now supported. - ADD: Delphi/CBuilder 10 Seattle now supported. - ADD: Delphi/CBuilder XE8 now supported. - ADD: Delphi/CBuilder XE7 now supported. - ADD: Delphi/CBuilder XE6 now supported. - ADD: Delphi/CBuilder XE5 now supported. - ADD: Delphi/CBuilder XE4 now supported. - ADD: Delphi/CBuilder XE3 now supported. - ADD: Delphi/CBuilder XE2 now supported. - ADD: Delphi/CBuilder XE now supported. - ADD: Delphi/CBuilder 2010 now supported. - ADD: Delphi/CBuilder 2009 now supported. - ADD: New demo project FlexCADImport. - FIX: The height of the TFlexRegularPolygon object incorrectly changes with its rotation. - FIX: Added division by zero protect in method TFlexControl.MovePathSegment. - FIX: The background beyond docuemnt wasn't filled when TFlexPanel.DocClipping=True. - FIX: In "Windows ClearType" font rendering mode (OS Windows mode) the "garbage" pixels can appear from the right and from the bottom sides of the painted rectangle of the TFlexText object. - FIX: The result rectangle incorrectly calculated in the TFlexText.GetRefreshRect method. - FIX: Added FPaintCache.rcPaint cleanup in the TFlexPanel.WMPaint method. Now it is possible to define is the drawing take place via WMPaint or via the PaintTo direct call (if rcPaint contain non-empty rectangle then WMPaint in progress). - FIX: The TFlexPanel.FPaintCache field moved in the protected class section. Added rcPaint field in FPaintCache that represents drawing rectangle. - ADD: In the text prcise mode (TFlexText.Precise=True) takes into account the rotation angle (TFlexText.Angle). - FIX: Removed FG_NEWTEXTROTATE directive (the TFlexText Precise mode should be used instead). - FIX: The TFlexRegularPolygon object clones incorrectly drawed in case when TFlexRegularPolygon have alternative brush (gradient, texture). - ADD: Add TFlexPanel.InvalidateControl virtual method which calls from TFle

5,927

社区成员

发帖
与我相关
我的任务
社区描述
Delphi 开发及应用
社区管理员
  • VCL组件开发及应用社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

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