本文整理自网络,侵删。
如何判断剪切板中中的内容的类型,是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 xe5、6、7在android或者ios上使用ansistring和ansichar
更多相关阅读请进入《Delphi》频道 >>