Click here to Skip to main content
15,916,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Retreiving next autonumber value Pin
Dave Kreskowiak16-Jan-10 19:33
mveDave Kreskowiak16-Jan-10 19:33 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux17-Jan-10 8:29
tonyonlinux17-Jan-10 8:29 
GeneralRe: Retreiving next autonumber value Pin
Dave Kreskowiak17-Jan-10 8:55
mveDave Kreskowiak17-Jan-10 8:55 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux17-Jan-10 9:19
tonyonlinux17-Jan-10 9:19 
GeneralRe: Retreiving next autonumber value Pin
Dave Kreskowiak17-Jan-10 15:05
mveDave Kreskowiak17-Jan-10 15:05 
GeneralRe: Retreiving next autonumber value Pin
tonyonlinux17-Jan-10 18:39
tonyonlinux17-Jan-10 18:39 
AnswerRe: Retreiving next autonumber value Pin
PIEBALDconsult17-Jan-10 5:13
mvePIEBALDconsult17-Jan-10 5:13 
QuestionHelp with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 9:49
shutupsquare16-Jan-10 9:49 
Hi ive just started using emguCV the .net implement of openCV

Im very new to c# and coding in general so i decided to do some Video analytics instead of the usual "Hello World" just to break me in.

I have a picture box on my form which shows the camera output

im just after a bit of advice on this bit of code in my project. I cant understand why the code below works and refresh the image fine, yet the code below the code below doesnt, even though in my head it should work fine

<br />
private void Form1_Load(object sender, EventArgs e)<br />
        {<br />
            <br />
            Capture capture = new Capture(); //create a camera captue<br />
            Application.Idle += new EventHandler(delegate(object sender1, EventArgs ef)<br />
            {  //run this until application closed <br />
                pictureBox1.Image = capture.QueryFrame().ToBitmap(); //draw the image obtained from camera frame<br />
            });<br />
            <br />
<br />
        }<br />


and my revised version of it doesnt work see below


private void Form1_Load(object sender, EventArgs e)
       {

           Capture capture = new Capture(); //create a camera captue
           while (true)
           {
               pictureBox1.Image = capture.QueryFrame().ToBitmap(); //draw the image obtained from camera frame
           }



       }


the first bit of code is pretty much straight off a tut and it works fine but I dont understand what its doing when it does this
Application.Idle += new EventHandler(delegate(object sender1, EventArgs ef)


but if i dont put
pictureBox1.Image = capture.QueryFrame().ToBitmap()
in a loop it works but obviosly its just a static image. so i thought if I loop it it would just keep refreshing as fast as it can get a frame from the capture.

If anyonce can help me or even understand what im on about it would be much apreciated.
AnswerRe: Help with PictureBox.image updating from Webcam capture Pin
Luc Pattyn16-Jan-10 10:03
sitebuilderLuc Pattyn16-Jan-10 10:03 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 10:17
shutupsquare16-Jan-10 10:17 
AnswerRe: Help with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 10:08
shutupsquare16-Jan-10 10:08 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
Luc Pattyn16-Jan-10 11:05
sitebuilderLuc Pattyn16-Jan-10 11:05 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
shutupsquare16-Jan-10 12:56
shutupsquare16-Jan-10 12:56 
GeneralRe: Help with PictureBox.image updating from Webcam capture Pin
Luc Pattyn16-Jan-10 13:03
sitebuilderLuc Pattyn16-Jan-10 13:03 
Questionencapsulation understanding problems Pin
binn01916-Jan-10 6:41
binn01916-Jan-10 6:41 
AnswerRe: encapsulation understanding problems PinPopular
Jimmanuel16-Jan-10 7:11
Jimmanuel16-Jan-10 7:11 
GeneralRe: encapsulation understanding problems Pin
binn01924-Jan-10 0:02
binn01924-Jan-10 0:02 
QuestionNeed help with drawing circles on mouse click event in pictureBox Pin
Midex16-Jan-10 5:49
Midex16-Jan-10 5:49 
AnswerRe: Need help with drawing circles on mouse click event in pictureBox Pin
Luc Pattyn16-Jan-10 6:13
sitebuilderLuc Pattyn16-Jan-10 6:13 
AnswerRe: Need help with drawing circles on mouse click event in pictureBox Pin
Dan Mos16-Jan-10 7:53
Dan Mos16-Jan-10 7:53 
QuestionBackgroundWorker with anonymous methods ? Pin
Mohammad Dayyan16-Jan-10 4:06
Mohammad Dayyan16-Jan-10 4:06 
AnswerRe: BackgroundWorker with anonymous methods ? Pin
Nicholas Butler16-Jan-10 4:59
sitebuilderNicholas Butler16-Jan-10 4:59 
GeneralRe: BackgroundWorker with anonymous methods ? Pin
Mohammad Dayyan16-Jan-10 6:58
Mohammad Dayyan16-Jan-10 6:58 
QuestionHolding data in memory Pin
Bardy8516-Jan-10 0:22
Bardy8516-Jan-10 0:22 
AnswerRe: Holding data in memory Pin
OriginalGriff16-Jan-10 1:01
mveOriginalGriff16-Jan-10 1:01 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.