using System;using System.Linq;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using Microsoft.WindowsMobile.Forms;namespace CameraNow{ public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void BtnCamera_Click(object sender, EventArgs e) { using (CameraCaptureDialog dlg = new CameraCaptureDialog()) { if (dlg.ShowDialog() == DialogResult.OK) { //MessageBox.Show("图片路径:" dlg.FileName); pictureBox1.Image = new Bitmap(dlg.FileName); } } } }}
评论