Windows Mobile:使用手机的相机与C# [英] Windows Mobile: using phone's camera with C#

查看:411
本文介绍了Windows Mobile:使用手机的相机与C#的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想显示手机的相机在WinForm中控制的图像。这个想法是我的应用程序的工作原理像相机的程序。

I want to show the image that mobile phone's camera its taking on a control in a WinForm. The idea is that my application works like camera's program. I want to show the image like if the user is going to take a photo.

我该如何做呢?我可以这样做吗?

How can I do that? Can I do that?

如果你需要更多的细节问我。

If you need more details ask me.

谢谢!

推荐答案

不太确定您需要什么,但您可以尝试使用Microsoft.WindowsMo​​bile.Forms.CameraCaptureDialog:

Not very sure what you need, but you may try using Microsoft.WindowsMobile.Forms.CameraCaptureDialog:

    string originalFileName;
    using (CameraCaptureDialog dlg = new CameraCaptureDialog()) {
        dlg.Mode = CameraCaptureMode.Still;
        dlg.StillQuality = CameraCaptureStillQuality.Low;
        //dlg.Resolution = new Size(800, 600);
        dlg.Title = "Take the picture";
        DialogResult res;
        try {
            res = dlg.ShowDialog();
        }
        catch (Exception ex) {
            Trace.WriteLine(ex);
            return null;
        }

        if (res != DialogResult.OK)
            return null;
        this.Refresh();
        originalFileName = pictureFileName = dlg.FileName;
    }

稍后编辑
您也许会发现这个链接很有用:
http://community.intermec.com/t5/General-Development-Developer/CN50-MS-Camera-Capture-Dialog-generates-error/mp/12881#M4083

这篇关于Windows Mobile:使用手机的相机与C#的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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