ActiveID VFW Example Code

ActiveID VFW Example Code

Using ActiveID is quick and simple, for example in Visual Basic to start a preview on your first capture device (Webcam, CCD, etc. ) Just write 1 line of code.

ctlActID.PreviewStart 0

To change the preview size to 320x240 resolution just write:

ctlActID.RequestedWidth = 320
ctlActID.RequestedHeight = 240
ctlActID.UpdateFormat


And to set the viewable preview size to that of your ID card or badges requirements simply write:

ctlActID.ViewableWidth = 100
ctlActID.ViewableHeight = 120
ctlActID.UpdateFormat

Or simply set the Requested and Viewable properties before the PreviewStart method to automate the process.

ctlActID.RequestedWidth = 320
ctlActID.RequestedHeight = 240
ctlActID.ViewableWidth = 100
ctlActID.ViewableHeight = 120

ctlActID.PreviewStart 0

Anytime during the preview to capture an image using ActiveID call the saveBMP or saveJPEG methods.

ctlActID.saveBMP "stringFilename" or
ctlActID.saveJPEG "stringFilename", intQuality

Where stringFilename is the drive, directory and filename you wish to save to and intQuality is a number between 1 and 100 for setting the quality of JPEG images.