C#图像操作复制和粘贴 [英] C# image operation copying and pasting

查看:513
本文介绍了C#图像操作复制和粘贴的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好先生,



您能告诉我如何在运行时以C#的形式复制和粘贴Windows窗体中的图像



我尝试了什么:



我试过图片盒但是在跑步的时候我无法复制和粘贴图像。

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.

推荐答案

好吧,



如果我正确理解了你的问题,你想要从另一个应用程序复制图像,然后将其粘贴到应用程序中的 PictureBox 中。这是你想要做的,不是吗?



你可以使用 PictureBox的事件KeyDown 检查Ctrl + V的压力。

然后从剪贴板中读取数据 Clipboard.GetImage()方法)然后使用该图像对象作为图像为你的PictureBox。



希望这有帮助。
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.


这篇关于C#图像操作复制和粘贴的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆