On 31-Dec-04, at 6:54 AM, Tony Alfrey wrote:
I have a method that draws an elaborate graph to a canvas control. It
rescales itself for the size of the control (so it asks the width and
height of the control). I want to print the same graph. Where do I
"read" the width and height of paper selected in the PrintDialog so
that I can scale the graph to fit?
In the PrinterSetup Class you will find this example:
Dim settings as String
Dim p as PrinterSetup
p=New PrinterSetup
If p.PageSetupDialog Then
settings=p.SetupString
End If
staticText1.text="PageLeft="+Str(p.pageLeft)
staticText2.text="PageTop="+Str(p.pagetop)
staticText3.text="PageHeight="+Str(p.pageheight)
staticText4.text="PageWidth="+Str(p.pagewidth)
staticText5.text="Height="+Str(p.Height)
staticText6.text="Width="+Str(p.width)
staticText7.text="Computed height="+Str(p.height-2*p.pagetop)
staticText8.text="Computed width="+Str(p.width-2*p.pageleft)
Terry
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://www.realsoftware.com/listarchives/lists.html>
|