dim scale as double=(g.width/p.width) // assumes HEIGHT of picture is less than WIDTH
dim h=scale*p.height
g.drawpicture p,0,0,g.width,h, 0,0,p.width,p.height
off the top of my head… but I think that would do it
G=graphics context of printer page
P=picture object you wish to draw
this works for any width/height (except zero…)
beware where are/arent the dots …
dim gheight as Integer = g.Width/p.Width*p.Height
dim gwidth as Integer = g.Height/p.Height*p.Width
if g.Width>g.Height then
g.DrawPicture p, 0, 0, gwidth, g.Height, 0, 0, p.Width, p.Height
else
g.DrawPicture p, 0, 0, g.Width, gheight, 0, 0, p.Width, p.Height
end if