我的delphi老是报错,unsupported Clipboard Format!谁能帮帮我!很着急的!先谢了!(100分)

  • 主题发起人 Gracezmhb
  • 开始时间
G

Gracezmhb

Unregistered / Unconfirmed
GUEST, unregistred user!
把一幅图像(.jpeg或.bmp)放在剪切板上,然后用Image.Picture.Bitmap.LoadfromClipboardFormat
(cf_BitMap,Clipboard.GetHandle(cf_BitMap),0)将它显示出来.可是编译的时候老是报错,说什么
Unsupported Clipboard Format.问题是前两天这个程序还可以运行的,今天就出错了!!
哪位高手能够帮帮我 ,我现在很着急啊!!
 
不支持这种格式?
 
Image1.Picture.Bitmap.LoadfromClipboardFormat
(cf_BitMap,Clipboard.GetHandle(cf_BitMap),0);
 
用Image1.Picture.Bitmap.Assign(ClipBoard)试试。
 
先使用clopboard.hasFormat(CF_BITMAP)判断数据格式

CF_TEXT Text with a CR-LF combination at the end of each line. A null character identifies the end of the text.
CF_BITMAP A Windows bitmap graphic.
CF_METAFILEPICT A Windows metafile graphic.
CF_PICTURE An object of type TPicture.
CF_COMPONENT Any persistent object.
 
这么长时间了,该结帖了。各位看看你们的分数吧。
41426277 30
easyzhou 30
xzh2000 40
谢谢各位啦!
 

Similar threads

D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
2K
DelphiTeacher的专栏
D
D
回复
0
查看
1K
DelphiTeacher的专栏
D
S
回复
0
查看
3K
SUNSTONE的Delphi笔记
S
S
回复
0
查看
2K
SUNSTONE的Delphi笔记
S
顶部