THIS IS WHAT I DO:
Dim lG As Graphics = pD.PrinterSetti ngs.CreateMeasu rementGraphics( )
Dim lHdc As IntPtr = lG.GetHdc()
leftOffsetP = GetDeviceCaps(l Hdc, PHYSICALOFFSETX )
topOffsetP = GetDeviceCaps(l Hdc, PHYSICALOFFSETY )
printableWidthP = GetDeviceCaps(l Hdc, HORZRES) 'Width in pixels,
printableHeight P = GetDeviceCaps(l Hdc, VERTRES) 'Height in raster lines
lG.ReleaseHdc(l Hdc)
lG.Dispose()
THIS IS WHAT I THINK:
lG, as define above, also maintains the default settings
pD.PrinterSetti ngs.DefaultPage Settings maintains the default settings
pD.DefaultPageS ettings tracks the current settings
That is, if the app changes the paper size, for example, the latter one
shows the change while the first two do not.
IS THAT RIGHT?
HOW CAN I OBTAIN THE PRINTABLE DIMENSIONS OF
THE CURRENT PAPER SIZE??
Thanks for any help
Dim lG As Graphics = pD.PrinterSetti ngs.CreateMeasu rementGraphics( )
Dim lHdc As IntPtr = lG.GetHdc()
leftOffsetP = GetDeviceCaps(l Hdc, PHYSICALOFFSETX )
topOffsetP = GetDeviceCaps(l Hdc, PHYSICALOFFSETY )
printableWidthP = GetDeviceCaps(l Hdc, HORZRES) 'Width in pixels,
printableHeight P = GetDeviceCaps(l Hdc, VERTRES) 'Height in raster lines
lG.ReleaseHdc(l Hdc)
lG.Dispose()
THIS IS WHAT I THINK:
lG, as define above, also maintains the default settings
pD.PrinterSetti ngs.DefaultPage Settings maintains the default settings
pD.DefaultPageS ettings tracks the current settings
That is, if the app changes the paper size, for example, the latter one
shows the change while the first two do not.
IS THAT RIGHT?
HOW CAN I OBTAIN THE PRINTABLE DIMENSIONS OF
THE CURRENT PAPER SIZE??
Thanks for any help
Comment