Click here to Skip to main content
15,899,825 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hello Sir,

Can you tell me how to copy and paste a image in a windows form in C# while running

What I have tried:

I tried picture Box but while running I'm not able to copy and paste an image.
Posted
Updated 19-Jul-17 16:22pm
v3
Comments
LLLLGGGG 19-Jul-17 13:20pm    
please never abuse of the exclamation mark '!' and please try something before you post the question. To answer you I simply did a quick searching on Google for the Clipboard.GetImage() method. This will reduce the number of downvotes.

1 solution

Well,

If I have correctly understood your question, you want to copy an image from another application then paste it inside a PictureBox in your application. This is what you want to do, isn't it?

You can use the event KeyDown of the PictureBox to check for the pressure of Ctrl+V.
Then read the data from the clipboard (Clipboard.GetImage() method) then use that image object as the image for your PictureBox.

Hope this helps.
 
Share this answer
 
Comments
Member 12942988 19-Jul-17 22:20pm    
Thank you for your response i hope this solution works.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900