VB School Assignment? Project Due Tomorrow? Chat LIVE With A Programming Expert!

Welcome to Dream.In.Code
Become a VB Expert!

Join 300,354 VB Programmers for FREE! Get instant access to thousands of VB experts, tutorials, code snippets, and more! There are 1,912 people online right now. Registration is fast and FREE... Join Now!




Getting Device Context

 

Getting Device Context

martin_xs6

23 Jun, 2009 - 04:15 PM
Post #1

New D.I.C Head
*

Joined: 23 Jun, 2009
Posts: 5


My Contributions
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.

User is offlineProfile CardPM
+Quote Post


vb5prgrmr

RE: Getting Device Context

23 Jun, 2009 - 07:09 PM
Post #2

D.I.C Regular
***

Joined: 21 Mar, 2009
Posts: 459



Thanked: 30 times
My Contributions
See if any of the code at...

http://www.shrinkwrapvb.com/

can help


Good Luck


User is offlineProfile CardPM
+Quote Post

martin_xs6

RE: Getting Device Context

30 Jun, 2009 - 01:52 PM
Post #3

New D.I.C Head
*

Joined: 23 Jun, 2009
Posts: 5


My Contributions
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.
User is offlineProfile CardPM
+Quote Post

vb5prgrmr

RE: Getting Device Context

30 Jun, 2009 - 08:28 PM
Post #4

D.I.C Regular
***

Joined: 21 Mar, 2009
Posts: 459



Thanked: 30 times
My Contributions
Okay, try this...

http://www.pscode.com/vb/scripts/ShowCode....22&lngWId=1

Good Luck


User is offlineProfile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic

Time is now: 11/7/09 07:15PM

Live VB Help!

Be Social

Dream.In.Code RSS Feed Dream.In.Code LinkedIn Group Follow Us On Twitter Fan Us On Facebook

VB Tutorials

Reference Sheets

VB Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month