如何使用 C# 在 windows mobile 6.5 中的内容管理器使用的查看器中打开图片?

发布于 2024-12-01 21:09:40 字数 528 浏览 0 评论 0原文

我目前正在使用紧凑框架 3.5 设计一个 Windows 移动应用程序,我需要能够显示用户为我之前存储的路径拍摄的图片。

目前我所做的就是创建一个新的表单对话框,将图片加载到 PictureBox 中,如下所示:

public formPictureViewer(string fileName)
{
    InitializeComponent();
    pictureBox.Image = new Bitmap(fileName);
}

上面的方法非常简单,但它的缺点是它不允许用户放大图像或以全屏方式查看它,除非所有这些功能都已编程到表单中。我想要的是简单地在单击智能手机的内容管理器/文件管理器中的 .jpg 文件时打开的同一对话框/查看器中调用或执行图片。可能这是windows mobile中与文件关联的默认查看器,它确实具有放大、全屏模式、设置为壁纸等功能。也许

这是一个非常简单的事情,比如调用类似于ShellExecute的东西...我'只是我是紧凑框架/Windows 移动开发的新手,还不知道所有技巧......

I'm currently designing a windows mobile application using compact framework 3.5 and I need to be able to display pictures taken by the user for paths that I have previously stored.

At the moment all I did was to create a new form dialog, that loads the picture into a PictureBox like this:

public formPictureViewer(string fileName)
{
    InitializeComponent();
    pictureBox.Image = new Bitmap(fileName);
}

The above approach is very simple, but it has the disadvantage that it does not allow the user to zoom in the image or to view it in full screen, unless all these features are programmed in to the form. What I would like is to simply call or execute the picture in the same dialog/viewer that opens up when clicking a .jpg file in the content manager/file manager of the smartphone. Probably this is the default viewer associated with the file in windows mobile, and it does have funcions for zooming in, full screen mode, setting as wallpaper, etc.

Maybe it's a very simple thing like calling something similar to ShellExecute... I'ts just that I'm new to the compact framework/windows mobile development and don't know all the tricks yet...

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

メ斷腸人バ 2024-12-08 21:09:40

您可以使用 System.Diagnostics 命名空间来调用内置的图片/图像查看器 (pimg.exe)

        ProcessStartInfo psi = new ProcessStartInfo();
        psi.FileName = @"\Windows\pimg.exe";
        psi.Arguments = @"\My Documents\My Pictures\Flower.jpg";

        Process.Start(psi);

You can use the System.Diagnostics namespace to call the built in picture/image viewer (pimg.exe)

        ProcessStartInfo psi = new ProcessStartInfo();
        psi.FileName = @"\Windows\pimg.exe";
        psi.Arguments = @"\My Documents\My Pictures\Flower.jpg";

        Process.Start(psi);
~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文