
Using API Polygon rtn on my printer...
Quote:
> I have a new VB 6.0 simple object drawing program running
> on Win 98. When I call the API Polygon routine to draw
> and fill a triangle, the object comes out printed very
> tiny on my 600 dpi printer. The object displays fine on
> my display screen.
> Is there a way I can make the API polygon rtn scale the
> object to my printer's scale? I read in the API GDI
> documentation about the MM_LOENGLISH=4 mode setting for
> displaying output on devices, but I don't know how to use
> it.
MM_LOENGLISH is a Mapping mode constant which you can set on a DC (Even on
the Printer's DC directly) using the SetMapMode() API call. You'll find
more information on it on it's page on the MSDN here:
http://msdn.microsoft.com/library/en-us/gdi/cordspac_3c6d.asp
You use it as follows:
'***
Dim OldMode As Long
OldMode = SetMapMode(Printer.hDC, MM_LONGLISH)
' Use Printer DC here...
SetMapMode Printer.hDC, OldMode
'***
You'll most likely find the API declare over on Http://www.AllAPI.net/
You may also want to grab the APIDraw library off my page which will
simplify using PolyLine() on the DC for you.
Hope this helps,
Mike
-- EDais --
- Microsoft Visual Basic MVP -
WWW: Http://EDais.earlsoft.co.uk/