Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Integrate a webcam to the form 1

Status
Not open for further replies.

CGR707

Programmer
Jul 7, 2002
20
PH


Hi, I just want to know how to integrate my webcam to the form. Thanks.



 
CGR707,

I recently wrote an app which interfaces to a web cam. I wrote an article which tells how to do it, and includes some example code.

You can read the article, which is called "Controlling TWAIN devices from within VFP", at:

Be sure to let me know if you have any questions.

Mike


Mike Lewis
Edinburgh, Scotland
 
Mike,

Thanks for responding my concern but my Webcam model is "Logitech QuickCam 5.4.1" and it doesn't have a "EZTWAIN.DLL or EZTW32.DLL". Is There other way?



CGR707
 
Use a Logitech Webcam. You get the active x for free enclosed with the cam. It´s not a big problem to use it with Visual Foxpro. Use the enclosed VB examples to find the trick of the trade. (There are some light syntax modifications to do that makes it run in Visual Foxpro).
 
CGR707,

The technique I described in my article applies to all TWAIN-compliant web cams. I don't know the Logitech model, but it is almost certain to be TWAIN-compliant. Almost all web cams are.

EZTWAIN.DLL does not come with the camera. It is a third-party product. You can download a trial copy from
Mike


Mike Lewis
Edinburgh, Scotland
 
Mike & Gerdi49,

Thanks a lot. Your suggestions/answers are very helpful in solving my problem. But, I realy appreciate if you can provide me another way of solutions. Thanks again.
 
Maybe the following FAQ I just put up would help?

faq184-3891 Webcam Video Capture

Slighthaze = NULL

[ul][li]FAQ184-2483
An excellent guide to getting a fast and accurate response to your questions in this forum.[/li][/ul]
 
hey Slighthaze,

i tried the code you gave in:
FAQ184-3891 Webcam Video Capture
registered the ocx and averything but when i try to run your code in a prg it errors out on the 2nd line with the following error:
OLE error code 0x800401f3: Invalid Class String
any ideas?

Thanks!
 
redzombi19,

The only time I've gotten this error is when an ocx isn't really registered or required files are missing. I would double-check this stuff...you are probably receiving the error right after the load event of the class right (if you step into createobject line of code)? I believe it is the OCX, try re-registering the ocx, or redownloading it even. I am using VFP 7 and it works as described, unless I unregister the ocx, at which point I see the error you got.

Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
ok i re-downloaded it, even tried it on 2 different machines, one running xp home, the other running 2k pro.
on there site they have 2 different downloads one is for vb5 and the other for vb6 i assume i need vb6 because the vb5 zip does not contain "ezVidC60.ocx" it only has "ezVidC.ocx" and i need only to register "ezVidC60.ocx", right?
let me know if any of this is wrong because no matter what i cant seem to get past this.

Thanks!
 
ok i figured it out,

you need to register ezVidCap.ocx not just ezVidC60.ocx
2 different ones in that case mabey the vb5 download would be the way to go, but if nothing else just register them both! (mabey i should have tried that sooner)


Thanks!
 
The problem is with my code...it was made for the VB5 ocx and then I switched to the VB6 ocx...change the following:

ADD OBJECT ezvidcap1 AS olecontrol WITH ;
Top = 24, ;
Left = 123, ;
Height = 100, ;
Width = 100, ;
Name = "ezVidCap1", ;
OleClass = "vbVidCap.ezVidCap"

...to this

ADD OBJECT ezvidcap1 AS olecontrol WITH ;
Top = 24, ;
Left = 123, ;
Height = 100, ;
Width = 100, ;
Name = "ezVidCap1", ;
OleClass = "vbVidC60.ezVidCap"



Slighthaze = NULL
[sub]craig1442@mchsi.com[/sub][sup]
"Whom computers would destroy, they must first drive mad." - Anon​
[/sup]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top