Click here to Skip to main content
15,889,281 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
namespace NPR
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }

        Capture cap;
        Bitmap image;

        private void button1_Click(object sender, EventArgs e)
        {
            cap = new Capture();
            Application.Idle += new EventHandler(mycam);
        }

        void mycam(object sender, EventArgs e) 
        {
            image = cap.QueryFrame().ToBitmap();
            pictureBox1.Image = image;
        }   
    }
}
Posted
Updated 11-Mar-15 21:34pm
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900