如何在Windows图片和传真查看器中打开pictureBox.Image? [英] How to open pictureBox.Image in Windows Picture and fax Viewer?

查看:112
本文介绍了如何在Windows图片和传真查看器中打开pictureBox.Image?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您好,抱歉令人不安。

我的表格上有一个pictureBox。我可以知道如何从Windows图片和传真查看器中的pictureBox打开图像吗?


我已经尝试过下面的代码,但是因为pictureBox1失败了。图像不是字符串格式。

Hello, sorry for disturbing.
I have a pictureBox on my form. May i know how to open the image from the pictureBox in Windows Picture and Fax Viewer?


I''ve tried the code below, but it failed because the pictureBox1.Image is not in String format.

展开 | 选择 | Wrap | 行号

推荐答案

我想你已经回答了你自己的问题。传真和图片查看器打开路径中的文件。我不知道它是否可以传递一个Image对象作为参数。


因此,如果它需要一个路径,那么你需要提供一个路径。用于将Image *放入* PictureBox中的那个...或者将图片保存到硬盘驱动器上的临时文件中,然后传递该路径。
I think you''ve answered your own question. Fax and Picture Viewer opens files from a path. I don''t know if it can be passed an Image object as an argument.

So if it requires a path, then you need to provide a path. Either the one used to get an Image *into* your PictureBox... or save the picture to a temp file on hard drive, then pass that path.


感谢您的回复。假设我已将图像保存到临时文件,我想在用户单击Windows图片和传真查看器上的关闭按钮后自动将其删除。


我可以知道如何编码以检测何时单击关闭按钮?

类似

if(WindowsPictureFaxViewer.Close ==选中)

{

//删除图片

}

检测正确的编码是什么关闭按钮?


提前致谢。

by,Aeris。
Thanks for replying. Let''s say i had saved the image to a temp file, i want delete it automatically once the user click the close button on the Windows Picture and Fax Viewer.

May I know how to code to detect when a Close button is clicked?
something like
if (WindowsPictureFaxViewer.Close == selected)
{
//delete the picture
}
what is the proper coding to detect the close button?

Thanks in advance.
by, Aeris.


你不会收到活动从另一个程序。你将不得不保持一个线程正在检查{在一个循环中]以查看传真和放大器。 Picture Viewer进程仍处于活动状态。一旦进程结束,然后删除临时文件。


我注意到Windows Photo Viewer标题是带有照片文件名的窗口。您还可以继续检查是否有打开文件名的窗口。一旦它不再出现,您就可以删除临时文件。
You won''t receive events from another program. You''ll have to keep a thread going that is checking {in a loop] to see if the Fax & Picture Viewer process is still active. Once the process ends, then delete the temp file.

I notice that Windows Photo Viewer titles it''s window with the photo file name. You could also keep checking to see if there is a window open with the file name. Once it no longer appears, then you can delete the temp file.


这篇关于如何在Windows图片和传真查看器中打开pictureBox.Image?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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