delphi 如何判断Clipboard剪切板中的内容的类型  
官方Delphi 学习QQ群: 682628230(三千人)\n
频道

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  

推荐分享
图文皆来源于网络,内容仅做公益性分享,版权归原作者所有,如有侵权请告知删除!
 

Copyright © 2014 DelphiW.com 开发 源码 文档 技巧 All Rights Reserved
晋ICP备14006235号-8 晋公网安备 14108102000087号

执行时间: 0.039237976074219 seconds