本文介绍了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;
    }



后来编辑:
部分你可能会发现有用此链接,太:

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

07-25 18:19