简体   繁体   English

将图像保存在剪贴板上,并可以粘贴到其他应用程序上的textview

[英]Save image on Clipboard, and can paste to textview on other application

When i use code as below, i can save image to Clipboard. 当我使用如下代码时,我可以将图像保存到剪贴板。

string file = @"C:\Temp\aaa.jpg";
Clipboard.SetImage(Image.FromFile(file));

But when i try to Paste(ctrl+v) to another application, such as textbox on IBM SameTime, then will fail, and i try to paste on excel/word work area, it can paste successfully. 但是当我尝试将(ctrl + v)粘贴到另一个应用程序(例如IBM SameTime上的文本框)时,则会失败,并且我尝试粘贴excel / word工作区,它可以成功粘贴。

The weird thing is, when i use Windows Paint draw someting and right click Copy, it can paste to all application successfully. 奇怪的是,当我使用Windows Paint绘制某些​​东西并右键单击Copy时,它可以成功粘贴到所有应用程序。

I would like to know that is textbox not support Bitmap format? 我想知道文本框是不是支持Bitmap格式?

Please advince, thanks. 请保佑,谢谢。

You're putting a jpeg stream into a bmp wrapper object. 你将一个jpeg流放入一个bmp包装器对象中。 Your application is probably not supporting this while office make this work. 您的应用程序可能不支持这个,而办公室使这项工作。 Try to convert first your image into bmp format which is apparently supported in your textbox. 尝试首先将您的图像转换为bmp格式,这在您的文本框中显然是受支持的。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 在Excel中使用剪贴板复制粘贴(VSTO代码)会冻结其他Microsoft Office应用程序 - Using Clipboard Copy Paste in Excel (VSTO code) freezes other Microsoft Office application 如何将图像从剪贴板粘贴到Word - How to paste image from clipboard to Word 如何访问剪贴板图像并将其保存在asp.net Web应用程序的服务器位置? - How to access clipboard image and save it at server location in asp.net web application? 如何从任何Windows应用程序(第二个剪贴板)复制和粘贴文本 - How to copy and paste text from any windows application (second clipboard) 如何将剪贴板数据粘贴到c#windows窗体中的另一个应用程序 - How to paste clipboard data to another application in c# windows form 如何将图像从剪贴板粘贴到Outlook电子邮件正文? - How to paste image from clipboard to Outlook email Body? 如何从数据库读取图形图像并将其作为文件粘贴到剪贴板? - How to read graphic image from database and paste it to clipboard as a file? 如何在UWP中将图像从剪贴板保存到文件 - How to save image from clipboard to file in UWP 如何将图像与DPI信息一起保存到剪贴板中? - How to save image along with DPI information into clipboard? 从剪贴板复制增强型图元文件并将其另存为图像 - Copy Enhanced Metafile from clipboard and save it as an image
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM