Results 1 to 2 of 2

Thread: Loading a picture into a report, keeping its dimensions

  1. #1

    Thread Starter
    Fanatic Member SkiNLaB's Avatar
    Join Date
    Jan 2002
    Location
    Sydney, Australia
    Posts
    747

    Loading a picture into a report, keeping its dimensions

    Hi guys..

    I'd like to load a picture (of varying dimensions) into my report, i can load a picture like so...
    Set Picture1.FormattedPicture = LoadPicture(App.path & "\seatMap.bmp")

    but the picturebox that is in the report keeps its dimensions, which forces the picture to the picturebox's dimensoins, making it bigger, longer, smaller etc.

    any ideas?

    thanks. are there properties of a .bmp file that i can read, and then i can use those to set the pciturebox height/width properties, and THEN load the picture? (that way the box and the pic will have matching dims.

    thanks

  2. #2
    PowerPoster
    Join Date
    Oct 2002
    Location
    British Columbia
    Posts
    9,758
    First load the picture into a StdPicture object. It has height, width properties that you can use to adjust the Picture1 properties. The set the Picture1.Picture equal to the StdPicture.

    Note that the StdPicture properties are in HiMetric units so you will need to convert them to Twips or Pixels or whatever scalemode you are using.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width