none
CameraCaptureDialog ShowDialog() 出错 RRS feed

  • 问题

  •             CameraCaptureDialog cameraCapture = new CameraCaptureDialog();
               
                cameraCapture.Owner = this;
                cameraCapture.InitialDirectory = @"\My Documents";
                cameraCapture.DefaultFileName = @"test.3gp";
                cameraCapture.Title = "Camera Demo";          
                cameraCapture.Mode = CameraCaptureMode.Still;
               
                if (DialogResult.OK == cameraCapture.ShowDialog())
                {
                    MessageBox.Show("OK");
                }
    提示 An unknown error occurred. 
    我一开始怀疑是属性设置的问题,InitialDirectory、DefaultFileName、Owner。。。都设置了也没有用
     查看cameraCapture的各个属性 如果没有设置就会提示“未能计算表达式的值” Owner里面的Contexmenue始终提示“未能计算表达式的值”
     请各位大侠帮忙解决一下,急 如果有DirectShow 能用的例子可以共享一下 
    补充:
    检查cameraCaptureDialog  发现cameraCaptureDialog.Owner.ContextMenu 这个地方出错 “未能计算表达式的值”mobile6.0 模拟器上调试通过 Mobile5.0不行 真机是6.0的 更不行
    2010年12月30日 7:56

答案

  • 您好 sunshine0576,

      欢迎来到MSDN中文论坛!

      我的建议也是先请检查一下路径设置.

      关于如何使用DirectShow来捕捉视屏我建议您参考一下下面的连接:

       http://www.codeguru.com/cpp/g-m/directx/directshow/article.php/c6973/Simultaneous-Previewing--Video-Capture-using-DirectShow.htm

     新年快乐!

     

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Brave Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2011年1月5日 3:30
    版主

全部回复

  • 你好, 是否是路径设置有问题。你可以参考一下SDK自带的例子,位于Folder: \Common\CS\CECamera。
    施炯
    2010年12月31日 1:28
    版主
  • 您好 sunshine0576,

      欢迎来到MSDN中文论坛!

      我的建议也是先请检查一下路径设置.

      关于如何使用DirectShow来捕捉视屏我建议您参考一下下面的连接:

       http://www.codeguru.com/cpp/g-m/directx/directshow/article.php/c6973/Simultaneous-Previewing--Video-Capture-using-DirectShow.htm

     新年快乐!

     

    This response contains a reference to a third party World Wide Web site. Microsoft is providing this information as a convenience to you. Microsoft does not control these sites and has not tested any software or information found on these sites; therefore, Microsoft cannot make any representations regarding the quality, safety, or suitability of any software or information found there. There are inherent dangers in the use of any software found on the Internet, and Microsoft cautions you to make sure that you completely understand the risk before retrieving any software from the Internet.


    Brave Zhou [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    2011年1月5日 3:30
    版主
  • cameraCaptureDialog.Owner.ContextMenu 主要是这个地方 未能计算表达式的值
    2011年1月14日 5:25
  • cameraCaptureDialog.Owner.ContextMenu 主要是这个地方 未能计算表达式的值 mobile6.0 模拟器上调试通过 Mobile5.0不行 真机是6.0的 更不行
    2011年1月14日 5:29
  • cameraCaptureDialog.Owner.ContextMenu 主要是这个地方 未能计算表达式的值 mobile6.0 模拟器上调试通过 Mobile5.0不行 真机是6.0的 更不行
    2011年1月14日 5:29