Printable Version of Topic

Click here to view this topic in its original format

Dream.In.Code _ VB6 _ Getting Device Context

Posted by: martin_xs6 23 Jun, 2009 - 04:15 PM

So I'm making a object tracking program in VB6, and it tracks the dry erase marker I'm using really well. The only problem is, I have to keep the window with the webcam's view in the foreground. I've been using the getforegroundwindow API to get the windows handle to the foreground, and then getting it's device context based on that. Normally, I'd just find the handle to the specific window, and use that to get the device context. Unfortunetly, when I use the handle for the webcam window, the image doesn't show up. So far I've tried to use Spy ++ which basically shows you all the window handles and stuff, but I've been unable to find a handle to the live feed. If anyone has any ideas on how to do this, that would be great.

Posted by: vb5prgrmr 23 Jun, 2009 - 07:09 PM

See if any of the code at...

http://www.shrinkwrapvb.com/

can help


Good Luck


Posted by: martin_xs6 30 Jun, 2009 - 01:52 PM

Yeah, I think this is more of a windows API question.. The website you gave me was interesting, but I'm more looking for a way to find a handle to something that doesn't seem to show up anywhere... Thanks anyway.

Posted by: vb5prgrmr 30 Jun, 2009 - 08:28 PM

Okay, try this...

http://www.pscode.com/vb/scripts/ShowCode.asp?txtCodeId=58422&lngWId=1

Good Luck


Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)