本文整理自网络,侵删。
如何判断剪切板中中的内容的类型,是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 xe tbitmap支持gif,成为具有jpg,gif,bmp,ico,gif五种显示功能的图片控件
Delphi 在 api 函数中使用 pchar 参数的几种方法
更多相关阅读请进入《Delphi》频道 >>