Hi friend ,
I am currently designing a project in which there is a picturebox and a upload button. If the user clicks on upload the file is open and the user select the desired picture from the file and display in the picturebox which is then saved to the db. Now what i want is intead of uploaded a picture from the user machine i want the user to be able to display a video from webcam in picturebox and while clicking capture ,want to display that image in another picturebox.I had checked in google,but not getting sufficient help for c# codes.thanks for your help in advance

I've never used it before, but I think you can use Microsoft Windows Image Acquisition (WIA). Add a reference to your project and build your application using the classes available in this library.

hey,
I got it,thanks.But i got a bug in that.while reopening the form again,showing a blank image i.e not showing video.

in load i had written

WebCam webcam = new WebCam();

                    webcam.Start();

for start function,i had written 

public void Start()
        {
            webcam.TimeToCapture_milliseconds = FrameNumber;
            webcam.Start(0);
            Continue();
            return;


        }

and for continue function ,i had written

public void Continue()
        {
            // change the capture time frame
            webcam.TimeToCapture_milliseconds = FrameNumber;

            // resume the video capture from the stop
            webcam.Start(this.webcam.FrameNumber);
        }

I really can't tell from the 2 methods you posted how are you handling things. For starters, what library are you using to connect to the webcam.

Also by lokking at your bug description, my best guess is that when you close the form you should also close the streaming and restart it on form open.

And one more thing

// resume the video capture from the stop
webcam.Start(this.webcam.FrameNumber);

Are you trying to resume from a frame in the past? Aren't you doing a live streaming? Maybe posting your form code could be more helpful as I'm having trouble understanding what it is supposed to do.

This article has been dead for over six months. Start a new discussion instead.