Results 1 to 7 of 7

Thread: Width of Form vs Width of Picturebox

  1. #1

    Thread Starter
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120

    Width of Form vs Width of Picturebox

    Hello all,

    I know this might be simple but I cant figure it out!, I have a picturebox that is almost as large as it is the form, but in the Width property of the picturebox I have 631 and in the width property of the form I have 10008, how come? they are almost the same, I should have moved something since I have other project where the units match. Help pleas!

  2. #2
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    You must have changed the scale properties of the form so the X and Y coords for controls inside the form changed. Set ScaleMode to twips

  3. #3
    I'm about to be a PowerPoster! mendhak's Avatar
    Join Date
    Feb 2002
    Location
    Ulaan Baator GooGoo: Frog
    Posts
    38,170
    Is the SCALEMODE property for your picturebox set to Pixels?

  4. #4

    Thread Starter
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120
    I set the scalemode property in both form1 and picture1 to pixels and nothing, then back to twips and the same....

  5. #5
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Are you sure the picture box in question is not in another container (container same color as form with no borders), like another picture box or a frame, and that mystery container being the culprit since it has Scale properties of its own?

    You didnt accidentally put the picture box in a container, right?

  6. #6

    Thread Starter
    Lively Member Xcoder's Avatar
    Join Date
    Jan 2004
    Posts
    120
    as a matter of fact it is , its inside another picturebox, what can be done? what a want to do is to resize the form, therefore the two pictureboxes, and then re-paint some graph I have inside the inner picturebox.

  7. #7
    PowerPoster
    Join Date
    Nov 2002
    Location
    Manila
    Posts
    7,629
    Right now, youd use the ScaleWidth and ScaleHeight of the outer pic box to position/resize the inner pic box.

    Forgot the equation that disregards the scalmode (I think it converts to himetric) to position/resize as you'd expect it to... maybe the others know about it. Good luck!

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