Delphi 如何判断Clipboard剪切板中的内容的类型


本文整理自网络,侵删。

 如何判断剪切板中中的内容的类型,是image 是text 是wav 
Some   of   the   possible   values   of   the   Format   parameter   follow.   HasFormat   supports   additional   formats   provided   by   Windows   or   by   other   applications   as   well   as   custom   formats   registered   with   TPicture.RegisterCliPBoardFormat.  
   
Value Meaning  
   
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.   
    

procedure   TForm1.Button1Click(Sender:   TObject);   
begin  
if   CliPBoard.HasFormat(CF_TEXT)   then  
      EdIT1.Text   :=   CliPBoard.AsText  

相关阅读 >>

Delphi dbgrid1查询只显示50条记录修改

Delphi web格式与tcolor类型的转换函数

Delphi winapi: messagebeep - 播放一个系统声音

Delphi android 保持唤醒状态

Delphi 读取网上的文本文件

Delphi 生成txt 指定带bom

Delphi中updown组件的使用方法

Delphi 使用管道进程间通讯

Delphi将图片转换成文本支持转换回去

Delphi检查是否在64位windows环境中运行?

更多相关阅读请进入《Delphi》频道 >>



打赏

取消

感谢您的支持,我会继续努力的!

扫码支持
扫码打赏,您说多少就多少

打开支付宝扫一扫,即可进行扫码打赏哦

分享从这里开始,精彩与您同在

评论

管理员已关闭评论功能...