Pity I dont have a webcam to try this out.
It seems that your code actually creates a window as a child of the picturebox.
You would normally make the child window the same size as the box.
If the picture box is smaller than the image you get from the cam, you will see only the part that fits.
If you grab the image from the picture box, you get waht the picture box gets.
But the full picture lives in the child window, not the parent.
The child can be identified by the hWnd created in the initialisation.
You should be able to grab its data using the BitBlt function you have included, but you will probably need to add CreateDC and or GetDC to the mix, to turn the handle into a device context.
Then your copy will be a BitBlt from the child window into your own, followed by a drawstring into your own.
And that should (?) work even if the picturebox is positioned at -300 off your main form, as long as it is set to visible.
Enter your message below
Sign in or Join us (it's free).