ImageEn for Delphi and C++ Builder ImageEn for Delphi and C++ Builder

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
Forum membership is Free!  Click Join to sign-up
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIEBitmap.CanPasteFromClipboard?
 New Topic  Reply to Topic
Author Previous Topic Topic Next Topic  

PeterPanino

864 Posts

Posted - Jun 20 2021 :  17:08:36  Show Profile  Reply
Is the only way to detect an image on the clipboard: creating a TIEBitmap instance and trying out the paste, and if you are lucky, then you know that there is an image on the clipboard?

var
  B: TIEBitmap;
begin
  B := TIEBitmap.Create;
  try
    if B.PasteFromClipboard then
    begin

    end;
  finally
    B.Free;
  end;


Is there no other way to detect if there is an image on the clipboard than creating a TIEBitmap instance? Can I detect whether there is an image on the clipboard BEFORE creating that instance?

xequte

38222 Posts

Posted - Jun 20 2021 :  17:29:38  Show Profile  Reply
Hi

You can use ImageEnView1.Proc.CanPasteFromClipboard():

https://www.imageen.com/help/TImageEnProc.CanPasteFromClipboard.html

Or if you don't want to use a visual component, just look at the code for CanPasteFromClipboard. The code to check for CF_DIB on the clipboard is pretty simple.


Nigel
Xequte Software
www.imageen.com
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
Jump To: