[英]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.