izotope Posted April 1, 2015 Share Posted April 1, 2015 How do insert images from the clipboard? Let's say the user presses a button and gets UniImage image? Quote Link to comment Share on other sites More sharing options...
Abaksoft Posted April 1, 2015 Share Posted April 1, 2015 Hellow Maksim, Try Google search : ------------------- uses Clipbrd; //cut procedure TForm1.Button1Click(Sender: TObject); Var ARect:TRect; begin Clipboard.Assign(Image1.Picture); with Image1.Canvas do begin CopyMode:=cmWhiteness; ARect:=Rect(0,0,Image1.Width,Image1.Height); CopyRect(ARect, Image1.Canvas, ARect); CopyMode:=cmSrcCopy; end; end; //copy procedure TForm1.Button2Click(Sender: TObject); begin Clipboard.Assign(Image1.Picture); end; //paste procedure TForm1.Button2Click(Sender: TObject); begin Image1.Picture.Assign(Clipboard); end; ------------------------- Just replace : - image1 by UniImage1 Regards. Quote Link to comment Share on other sites More sharing options...
Tim Posted April 6, 2015 Share Posted April 6, 2015 Hi Abaksoft, Maybe the following link helps? http://stackoverflow.com/a/15304663/2444493 Best regards, Tim Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.