Welcome to MSDN Blogs Sign in | Join | Help

Visual Studio For Devices

A Team blog from the Visual Studio for Devices Team

Syndication

Code Snippet for CameraCaptureDialog

Here's a code snippet for using the camera capture dialog. To use this snippet save it to a text file called "CameraCaptureDialog.snippet" and put it in your My Documents\Visual Studio 2005\VB\My Code Snippets folder.

<?xml version="1.0" encoding="UTF-8"?>
<CodeSnippets xmlns="
http://schemas.microsoft.com/VisualStudio/2005/CodeSnippet">
  <CodeSnippet Format="1.0.0">
  <Header>
   <Title>Camera Capture Dialog</Title>
   <Shortcut>CameraCaptureDialog</Shortcut>
   <Description>Code snippet for the Windows Mobile CameraCaptureDialog</Description>
   <Author>Microsoft Corporation</Author>
   <SnippetTypes>
    <SnippetType>Expansion</SnippetType>
   </SnippetTypes>
  </Header>
  <Snippet>
      <References>
        <Reference>
          <Assembly>Microsoft.WindowsMobile.Forms.dll</Assembly>
        </Reference>
      </References>
      <Imports>
        <Import>
          <Namespace>Microsoft.WindowsMobile.Forms</Namespace>
        </Import>
      </Imports>
        <Declarations>
    <Literal>
     <ID>title</ID>
     <Default>"Take a Picture"</Default>
     <ToolTip>The title for the dialog</ToolTip>
    </Literal>
   </Declarations>
   <Code Language="VB" Kind="method body">
    <![CDATA[
        Dim cameraDialog As New CameraCaptureDialog()

        cameraDialog.Owner = Me
        cameraDialog.Title = "Take a Picture"

        If ((cameraDialog.ShowDialog() <> DialogResult.OK) _
            Or (cameraDialog.FileName = "")) Then
            ' Handle the cancel case here.
        End If
]]>
   </Code>
  </Snippet>
 </CodeSnippet>
</CodeSnippets>

[Author: Neil Enns]

Published Wednesday, June 29, 2005 1:15 PM by MobileDevGroup

Filed under:

Comments

# The Mobile Minute 100 @ Sunday, July 03, 2005 12:00 PM

&amp;nbsp;Wooo Hooo!&amp;nbsp;&amp;nbsp; TMM 100.&amp;nbsp; Thought I&amp;rsquo;d never get here at the rate I post &amp;lt;g&amp;gt;;...

Nino.Mobile

# Windows Mobile 5.0 | keyongtech @ Thursday, January 22, 2009 12:15 AM

PingBack from http://www.keyongtech.com/463691-windows-mobile-5-0-a

Windows Mobile 5.0 | keyongtech

New Comments to this post are disabled
Page view tracker