This method retrieves the handle to the pointer of the specified printer's DEVMODE structure. The DEVMODE structure stores information about various settings and properties of a device, such as a printer.

[Visual Basic]   [ Boolean = ]imagekitcontrolname.PrintDraw.GetDevModeHandle
[Visual C++]     [ BOOL = ]imagekitcontrolname.GetPrintDraw().GetDevModeHandle()
[VB.NET]   [ Boolean = ]imagekitcontrolname.PrintDraw.GetDevModeHandle()
[C#.NET]   [ bool = ]imagekitcontrolname.PrintDraw.GetDevModeHandle()

Parameters

None

Return Value

Returns True (nonzero) when successful, returns False (0) when not successful.

Explanation

The GetDevModeHandle method retrieves the handle to the pointer of the specified printer's DEVMODE structure. The DEVMODE structure stores information about various settings and properties of a device, such as a printer.

To execute this method, set the PrinterName property or the PrintFileName property. (the printer file name saved by the SaveDevModeHandle or SavePrinterInfo methods). If both the PrinterName property and the PrintFileName property are set, the PrinterName takes precedence.


Examples:

Retrieving the DEVMODE handle from the printer name

    ImageKit1.PrintDraw.PrinterName = "EPSON LP-8200C"

    ImageKit1.PrintDraw.PrintFileName = ""

    ImageKit1.PrintDraw.GetDevModeHandle

    'Enter your processing code here... ..

    ImageKit1.PrintDraw.ReleaseDevModeHandle

Retrieving the DEVMODE handle from the printer settings file

    ImageKit1.PrintDraw.PrinterName = ""

    ImageKit1.PrintDraw.PrintFileName = "IkPrn.Ik"

    ImageKit1.PrintDraw.GetDevModeHandle

    'Enter your processing code here... ..

    ImageKit1.PrintDraw.ReleaseDevModeHandle


If this method is successfully executed, the handle to the pointer of the DEVMODE structure will be set in the DevMode property. The DevMode property is used by the PrintCreateDC method. For more information about the DEVMODE structure, please refer to WindowsAPI or related manuals.


Note: The handle to the pointer of the DEVMODE structure is freed using the ReleaseDevModeHandle method.

 

The ImageKit9 ActiveX is a product created by Newtone Corporation