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

 

ImageEn Forum
Profile    Join    Active Topics    Forum FAQ    Search this forumSearch
 All Forums
 ImageEn Library for Delphi, C++ and .Net
 ImageEn and IEvolution Support Forum
 TIEBitmap.CanPasteFromClipboard?

Note: You must be registered in order to post a reply.
To register, click here. Registration is FREE!

View 
UserName:
Password:
Format  Bold Italicized Underline  Align Left Centered Align Right  Horizontal Rule  Insert Hyperlink   Browse for an image to attach to your post Browse for a zip to attach to your post Insert Code  Insert Quote Insert List
   
Message 

 

Emoji
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Black Eye [B)]
Frown [:(] Shocked [:0] Angry [:(!] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

 
Check here to subscribe to this topic.
   

T O P I C    R E V I E W
PeterPanino Posted - Jun 20 2021 : 17:08:36
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?

1   L A T E S T    R E P L I E S    (Newest First)
xequte Posted - Jun 20 2021 : 17:29:38
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