how to print only the visible part of the displayed image
how to print only the visible part of the displayed image
vb6
how to print only that part of image, which is visible on the window of GdViewer ?
how to print only that part of image, which is visible on the window of GdViewer ?
Like that:
Regards,
Loïc
Code: Select all
Dim oGdPicture As New GdpicturePro.cGdPicture
Dim nImageID As Long
nImageID = oGdPicture.CreateImageFromHwnd(oGdViewer.hWnd)
oGdPicture.SetNativeImage (nImageID)
oGdPicture.PrintImage
Regards,
Loïc
So you can do like that:
Code: Select all
Dim nLeft As Long, nTop As Long, nHeight As Long, nWidth As Long
Call oGdViewer.GetDisplayedArea(nLeft, nTop, nWidth, nHeight)
Call oGdViewer.CopyRegion2Clipboard(nLeft, nTop, nWidth, nHeight)
Call oGdViewer.DisplayFromClipboardData
Call oGdViewer.PrintImage
Who is online
Users browsing this forum: No registered users and 1 guest