Kerry,
The code
will look like this: LEAD1.ClientToBitmap
0, 0 Dim
xBmp, yBmp, wBmp, hBmp xBmp =
LEAD1.ConvertX yBmp =
LEAD1.ConvertY Dim
vScrl, hScrl vScrl =
0 hScrl =
0 If
LEAD1.VScrollInfo.Visible Then vScrl = LEAD1.VScrollInfo.Width End If If
LEAD1.HScrollInfo.Visible Then hScrl = LEAD1.HScrollInfo.Width End If LEAD1.ClientToBitmap
LEAD1.ScaleWidth - vScrl, LEAD1.ScaleHeight - vScrl wBmp =
LEAD1.ConvertX - xBmp hBmp =
LEAD1.ConvertY - yBmp LEAD1.SetSrcRect
xBmp, yBmp, wBmp, hBmp Dim hDC hDC =
LEAD1.PrintStart LEAD1.Render
hDC, 0, 0, 0, 0 LEAD1.PrintEnd
hDC Please
note that it will change the display, so you might want to store the source
rectangle values (x, y, width and height) and restore them after printing.
Adnan Ismail LEADTOOLS Technical Support
|