GetPaperWidth 

Returns the value of the dmPaperWidth member of the DevMode. (DM.dmPaperWidth member of BlackIceDEVMODE ) This value represents the 'Actual paper width'.

 

The returned value is in tenths of millimeters. To convert the value to pixels, use the GetXDPI function and the following formula:

 

WidthInPixels = (float)GetPaperWidth(pDevMode) / 254.0 * (float)GetXDPI(pDevMode);

 

GetPaperWidth (pBlackIceDEVMODE As Long) As Long

 

Input value   - handle to the BlackIceDEVMODE.

Return value            - paper width.

 

NOTE: For 32-bit applications , use pBlackIceDEVMODE as Integer, instead of Long.