public void SaveImage(string ImageDir, string imageName) {//拍照并保存 if (ImageDir == "" || ImageDir == null) { MessageBox.Show("请输入" + imageName + "的文件路径!"); } else { string imagePath = ImageDir + "\\" + imageName; video.GrabImage(this.pictureBox1.Handle, imagePath); } }
private void button3_Click(object sender, System.EventArgs e) { video.GrabImage(pictureBox1.Handle, "a.bmp"); }