• resize a graph for screen resolution (XP)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » resize a graph for screen resolution (XP)

    Author
    Topic
    #388831

    I have a report with a bar graph. I designed it using a pc with 800×600 screen resolution and it looks fine. However, some users have chaged their screen to 1024×768 and the bar graph looks out of proportion on the page. Is there a way to scale the size of the graph based on each users screen settings? Some of the graph properties that I think may be relevant are Class: MSGraph.Chart.8 and OLE Class: Microsoft Graph Chart. Size Mode: Stretch.
    Thanks,

    Viewing 0 reply threads
    Author
    Replies
    • #684340

      You can resize the chart with the form by writing code in the On Resize event of the form. For a chart named cht:

      Private Sub Form_Resize()
      cht.Height = Me.InsideHeight – Me.FormHeader.Height – Me.FormFooter.Height – 1440
      cht.Width = Me.InsideWidth – 720
      End Sub

      The number 1440 and 720 are meant to ensure that the chart doesn’t fill the entire detail section. You’ll have to fine tune these values yourself. They are in twips (1 inch = 1440 twips).

    Viewing 0 reply threads
    Reply To: resize a graph for screen resolution (XP)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: