Solved

how to activate camera

Posted on 2006-11-17
8
1,208 Views
Last Modified: 2013-11-18
I have an application that need to activate the camera and let the user save the photo, i am not sure how to do this, don't know what API does this.... please help.
0
Comment
Question by:str_kani
  • 4
  • 2
  • 2
8 Comments
 
LVL 48

Expert Comment

by:Mikal613
ID: 17966863
0
 
LVL 12

Author Comment

by:str_kani
ID: 17966925
i visited this already, FYI

i am using, VS 2005, VB
0
 
LVL 48

Expert Comment

by:Mikal613
ID: 17973068
Microsoft is working on one now. But there is no "Official" one now.
0
 
LVL 12

Author Comment

by:str_kani
ID: 17973882
how this works out it Windows Mobile 5, can change my device if needed.
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 9

Expert Comment

by:checoo
ID: 18000885
With the Windows Mobile 5.0 software a generic camera API is now defined that device manufacturers support. The .NET Compact Framework, Windows Mobile 5.0 software includes a ready-made dialog named CameraCaptureDialog available in , and you can find it in the "Microsoft.WindowsMobile.Forms".

An indicative sample code is given below

private void photoMenuItem_Click(object sender, EventArgs e)
{
  CameraCaptureDialog cameraCaptureDialog = new CameraCaptureDialog();
  cameraCaptureDialog.Owner = this;
  cameraCaptureDialog.Title = "Take Exhibit Photo";
  cameraCaptureDialog.Mode = CameraCaptureMode.Still;
  if(cameraCaptureDialog.ShowDialog() == DialogResult.OK &&
    cameraCaptureDialog.FileName.Length > 0)
  {
    fileExtension = Path.GetExtension(cameraCaptureDialog.FileName);
    File.Copy(cameraCaptureDialog.FileName, fileName());
    pictureBox.Image = new Bitmap(fileName());
  }
}

The above is a C# code but can be converted fairly easily to VB.NET. Let me know if you need any help.
0
 
LVL 12

Author Comment

by:str_kani
ID: 18003179
seems easy, would help me alot if you could convert this... thank you.
0
 
LVL 9

Accepted Solution

by:
checoo earned 500 total points
ID: 18003249
Hope this helps --

Private Sub photoMenuItem_Click(ByVal sender As Object, ByVal e As EventArgs)
 Dim cameraCaptureDialog As CameraCaptureDialog = New CameraCaptureDialog
 cameraCaptureDialog.Owner = Me
 cameraCaptureDialog.Title = "Take Exhibit Photo"
 cameraCaptureDialog.Mode = CameraCaptureMode.Still
 If cameraCaptureDialog.ShowDialog = DialogResult.OK AndAlso cameraCaptureDialog.FileName.Length > 0 Then
   fileExtension = Path.GetExtension(cameraCaptureDialog.FileName)
   File.Copy(cameraCaptureDialog.FileName, fileName)
   pictureBox.Image = New Bitmap(fileName)
 End If
End Sub
0
 
LVL 12

Author Comment

by:str_kani
ID: 18063670
Excellent!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Progress means simplifying, not complicating. Bruno Munari Preface How to detect the name of the internal storage or an SD-card on Windows Mobile device from the desktop application? I got this question, when I was working on a PC applicati…
With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Migrating to Microsoft Office 365 is becoming increasingly popular for organizations both large and small. If you have made the leap to Microsoft’s cloud platform, you know that you will need to create a corporate email signature for your Office 365…

920 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

16 Experts available now in Live!

Get 1:1 Help Now