Re: how to place the image of an object in the form?
actually I have this ocx control that captures image from webcam but it is not a picturebox control so its hard for me to save the image to file or to db. i have other codes to capture image from webcam to picturebox but then after its first use, i can no longer detect the webcam device. but this ocx has no problem.
so it came to my idea if there is a way to capture that ocx control to picturebox.
Last edited by ravemaster; Feb 3rd, 2013 at 11:27 PM.
Re: how to place the image of an object in the form?
yes I have checked it but i only give me black picturebox, no image at all, only black. that is why I wonder why that ocx is having no problem except that it has no save to file or to db capability.
Re: how to place the image of an object in the form?
everytime I run the program, it will run properly and the camera device is detected but when I close the program and reopen it again, it , is as if it dont detect the device anymore. with this problem, I need to uninstall the device and reinstall the device again before the program can detect the device again. this is always the instance.
Re: how to place the image of an object in the form?
Originally Posted by ravemaster
yes I have checked it but i only give me black picturebox, no image at all, only black.
I have to assume that the DrirectShow filter graph I am using doesn't work for your camera. Since you have the source you could try a different filter graph, but I assume you haven't gone over my code alongside the DirectShow for VB documentation (in your MSDN Library CDs).
Perhaps if I knew what camera you have it might help me figure out what to tweak in the filter graph. I only have two webcams to test with riht now and at least i have both working. I'd like to figure out a more universal set of filters that work for more cameras though.
The other thing might be the capture configuration for the camera. The defaults can be undesireable.
The newest demos (5a, 5b) I've posted give you a chance to set the capture properties on cam-start (though it doesn't save/load settings yet). Of course to use it you will have to download and install a 3rd party DLL.
Last edited by dilettante; Feb 2nd, 2013 at 09:12 AM.
Re: how to place the image of an object in the form?
dilettante I tried the 5c demo but still same black screen with a little almost 1 milimeter by 1 milimeter size on the upper left corner of the box only showing that the cam is working coz you see the image from the cam.
Re: how to place the image of an object in the form?
Weird. Hard to imagine how, that's DirectShow's preview window set to scale itself to the requested dimensions. It must be scaling or that part of the Form would be the ButtonFace color, not black.
Re: how to place the image of an object in the form?
Originally Posted by ravemaster
I have this picturebox cotrol and this another control lets say button2.
I would like to click on button1 and capture the image of button2 and place that on the picturebox control?
All of this controls are on the same form.
Maybe this is what you need
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.
Re: [RESOLVED] how to place the image of an object in the form?
What do you mean how to open it? It's a zip file. You have to have an app that opens zip files, WinZip. for example
Anything I post is an example only and is not intended to be the only solution, the total solution nor the final solution to your request nor do I claim that it is. If you find it useful then it is entirely up to you to make whatever changes necessary you feel are adequate for your purposes.