Loading...

how to print only the visible part of the displayed image

Support for GdViewer OCX and GdViewer Pro ActiveX/SDK.

how to print only the visible part of the displayed image

Postby astva » Fri Sep 21, 2007 12:03 pm

vb6
how to print only that part of image, which is visible on the window of GdViewer ? :?: :!:
astva
 
Posts: 12
Joined: Fri Sep 21, 2007 10:15 am

Postby Loïc » Fri Sep 21, 2007 12:40 pm

Like that:


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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby astva » Fri Sep 21, 2007 1:26 pm

I have GdViewer only
astva
 
Posts: 12
Joined: Fri Sep 21, 2007 10:15 am

Postby Loïc » Fri Sep 21, 2007 1:47 pm

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
Loïc Carrère, support team.
www.orpalis.com
User avatar
Loïc
Site Admin
 
Posts: 4442
Joined: Tue Oct 17, 2006 10:48 pm
Location: France

Postby astva » Fri Sep 21, 2007 1:56 pm

ok! :D
astva
 
Posts: 12
Joined: Fri Sep 21, 2007 10:15 am


Return to GdViewer [Pro] ActiveX

Who is online

Users browsing this forum: No registered users and 1 guest