枝
枝上柳绵
Unregistered / Unconfirmed
GUEST, unregistred user!
img:=elem as IHTMLImgElement;
ce:=img as IHTMLControlElement;
cp.add(ce);
try
cp.execCommand('Copy',false,0);//偶尔出现这样的错误 "cannot open clipbroad "
try
MyHandle := Clipboard.GetAsHandle(cf_Bitmap);
bmpPtr := GlobalLock(MyHandle);
img1.Picture.LoadFromClipboardFormat(cf_BitMap,MyHandle,0);
Clipboard.Clear;
GlobalUnlock(MyHandle);
finally
Clipboard.Close;
end;
bmp:=(img1.Picture.Bitmap as TBitmap) ;
checkstr:=getCheckStr(bmp);
except
img1.Picture.LoadFromClipboardFormat(cf_BitMap,ClipBoard.GetAsHandle(cf_Bitmap),0);
checkstr :='';
end;
从网上找到这样的答案
When applications do operations on the clipboard they need to lock it (to prevent other applications using the clipboard at the same time). In your case, SuperMemo tried to paste the article at the time when clipboard was locked. The following might have caused the situation:
1.you are pasting a large or complex article that takes longer to copy (repeat the paste to succeed)
2.another application locked the clipboard (see which or wait)
3.an application locked the clipboard permanently while crushing (at worst, restart Windows)
Retrieved from "http://wiki.supermemo.org/index.php?title=Cannot_open_clipboard"
查到原因,但是还是不能解决问题,应当是clipbroad的问题,但是我尝试了很多次都没有解决问题,破解成功10,然后就有一次这样的错误,
个人感觉不会是网页的问题,可能是delphi的剪贴板的问题,应当是我的程序那一步没有做到,但是我找不到,呵呵
谢谢您的关注
ce:=img as IHTMLControlElement;
cp.add(ce);
try
cp.execCommand('Copy',false,0);//偶尔出现这样的错误 "cannot open clipbroad "
try
MyHandle := Clipboard.GetAsHandle(cf_Bitmap);
bmpPtr := GlobalLock(MyHandle);
img1.Picture.LoadFromClipboardFormat(cf_BitMap,MyHandle,0);
Clipboard.Clear;
GlobalUnlock(MyHandle);
finally
Clipboard.Close;
end;
bmp:=(img1.Picture.Bitmap as TBitmap) ;
checkstr:=getCheckStr(bmp);
except
img1.Picture.LoadFromClipboardFormat(cf_BitMap,ClipBoard.GetAsHandle(cf_Bitmap),0);
checkstr :='';
end;
从网上找到这样的答案
When applications do operations on the clipboard they need to lock it (to prevent other applications using the clipboard at the same time). In your case, SuperMemo tried to paste the article at the time when clipboard was locked. The following might have caused the situation:
1.you are pasting a large or complex article that takes longer to copy (repeat the paste to succeed)
2.another application locked the clipboard (see which or wait)
3.an application locked the clipboard permanently while crushing (at worst, restart Windows)
Retrieved from "http://wiki.supermemo.org/index.php?title=Cannot_open_clipboard"
查到原因,但是还是不能解决问题,应当是clipbroad的问题,但是我尝试了很多次都没有解决问题,破解成功10,然后就有一次这样的错误,
个人感觉不会是网页的问题,可能是delphi的剪贴板的问题,应当是我的程序那一步没有做到,但是我找不到,呵呵
谢谢您的关注