izotope Posted April 1, 2015 Posted April 1, 2015 How do insert images from the clipboard? Let's say the user presses a button and gets UniImage image? Quote
Abaksoft Posted April 1, 2015 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
Tim Posted April 6, 2015 Posted April 6, 2015 Hi Abaksoft, Maybe the following link helps? http://stackoverflow.com/a/15304663/2444493 Best regards, Tim Quote
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.