Hi Experts,
I have come across several ways to send email in VFP using CDO, BLAT, Outlook or some 3rd party app.
Which one basically uses native functions in Windows 10/11?
I find CDO kinda iffy coz it needs to reference some URL like...
Chriss,
Sorry for late reply. I took a couple of days off.
The webcam class has an Init() that calls the DeclareDLLs() method. Kindly check the code I sent a few posts back. You may have missed it coz it's strangely in one of the last methods in the class definition.
This class is dropped...
Chriss,
To make the Webcam custom class more flexible, I added a UseBitMapInfo property which is .F. by default.
If .F., it will show the default Format Dialog. If .T., which is the case when I dropped it on the form, it will create the object loBitMapInfoHeader object and populate its...
Chriss,
I am fully aware of the differences between NEWOBJECT and CREATEOBJECT, with the latter having no need of the classlib being part of Set Classlib...
I will still dig deeper to my app settings sir.
Thanks.
Chriss,
Before I test run each of them scenarios, I always make it a point to do CLEAR ALL. I also redo the testing by quitting VFP and getting back to it.
Crazy really. Ever since I went to CREATEOBJECT and changed to different values, it works.
FWIW, the Struct class examples use...
...plot thickens. Below is the code of two classes - BitMapInfoHeader class (based on Struct class) and Webcam (wrapper class to the GitHub code).
***************************************************-- Class Library: d:\vfpxdev\payprox\classes\webcam.vcx...
Chriss
Let me double check my code sir.
I appreciate your precious time. You based in the US of A? You still doing VFP apps? Are there still VFP dev going on there?
Chriss,
That's exactly what I did - I created method SetVideoFormat in the Webcam class so that it would be cleaner.
Turned out though that this method's code have to be explicitly in the Form Init() rather than calling oWebcam.SetVideoFormat() for it to work.
Chriss,
I create class BITMAPINFOHEADER which is a subclass of Christof's STRUCT class.
The entire data structure is defined in the class I created.
My bad. I should have told you that earlier.
And yes, 'This' was used in the webcam class. Not ThisForm.
Chriss,
I just jazzed up the name of the methods. Hahaha
Msg() in the original one, I just made it MessageCenter(), with exactly the same code.
All the methods I kinda changed their names, that's all.
...lpString )
ELSE
ThisForm.oWebcam.ShowFormatDialog()
ENDIF
ENDIF
ThisForm.oWebcam.StartPreview()
ELSE
* MESSAGEBOX( "Webcam connection unsuccessful.", 0+16, ThisForm.Caption )
ENDIF
ThisForm.RefreshControls()
Here is what did not work:
I simply...
Chriss,
Here is the strange part. I wrapped the GitHub code into a custom class. I made a SetVideoFormat method that first creates a struct then calls SendMessage with the WM_CAP_SET_VIDEOFORMAT and struct.
So in the Init of the form with the webcam, I called the SetVideoFormat of this custom...
vernpace,
Hi. I developed this for a timekeeping app. Employee taps his RFID card into a reader which then locates the guy's employee data on one side of the form, and on the other side the webcam interface shows him on.
It will now record the time log together with his photo.
Chris Miller,
Hi. When you run that Github code the first time, the form shows a black rectangle. You then press the Format button to get the right configuration - in my case it is 640x480 and YUY2 - the webcam then works.
The succeeding times you run the form, it will already remember the...
Hi Mike,
Here is the link to the source code:
https://github.com/VFPX/Win32API/blob/master/samples/sample_437.md
Have been at this for hours on end. I really thought I was done with this project as it was working like a charm in the IDE, but to my great dismay, it kept on showing the Format...
Hi Mike,
When I ran the form in our VFP IDE, it will remember the settings (640x480, YUY2, 614400) after the first Video Format dialog. We can use your suggestion in this case.
But, when I compiled it into an EXE already, the Video Format dialog kept on reverting back to the default values...
Hi Chriss,
Thanks for your reply.
I did see the link you gave. But man, this is gonna be a whole lot of digging! Am just hoping that someone who has done this would generous enough to help out.
One thing I noticed - it remembers the settings when the form is run in our VFP IDE.
Once I chose...
Hi Guys,
I was able to fire up a webcam on a VFP form using this link:
https://github.com/VFPX/Win32API/blob/master/samples/sample_437.md
The problem is, every time the form shows, it will always show a Format Dialog (shown below) asking for Resolution, Pixel Depth and Size.
Anyway I can...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.