启动"Windows图片和传真Windows";显示图像 [英] launch the "Windows Picture and Fax Windows" to display an image

查看:72
本文介绍了启动"Windows图片和传真Windows";显示图像的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好朋友,

我将要在VB NET中编写一些代码,当我单击标记为< Open>的按钮时,它将使用"Windows图片和传真Windows"显示JPEG图像(存储在磁盘上).
因此,它实际上是右键单击文件,然后执行打开方式",然后在程序中选择"Windows图片和传真Windows".

这是我插入按钮单击事件的代码片段,但未按预期工作:

Hello friends,

I am about to write a little code in VB NET that when I click a button labelled <Open>, it displays a JPEG image (stored on disk) using the "Windows Picture and Fax Windows".

So it comes down to right click on the file physically, then do "open with" and choose among the programs'' "Windows Picture and Fax Windows".

Here is the snippet I plugged in my button click event and It did not work as expected:

'An instance of the Process class
Sun proc As New System.Diagnostics.Process ()
Name of the executable to launch
proc.StartInfo.FileName = "c: \ windows \ system32 \ shimgvw.dll"
'Arguments to pass to the executable to launch
proc.StartInfo.Arguments = "c: \ test.jpg"
'Start the process
proc.Start ()
'It frees resources that are needed most.
proc.Close () 'Warning Close does not terminate the process.

推荐答案

您可以放置​​图像路径而不是C:\ 8617.png

You can put your image path instead of C:\8617.png

Shell("rundll32.exe shimgvw.dll,ImageView_Fullscreen C:\8617.png")


这篇关于启动"Windows图片和传真Windows";显示图像的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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