Results 1 to 3 of 3

Thread: [RESOLVED] Visible surface of Picturebox is too small

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jun 2009
    Location
    Hungary
    Posts
    19

    Resolved [RESOLVED] Visible surface of Picturebox is too small

    Hi

    I'm drawing lines directly on a PictureBox. My problem is that the visible surface of the PictureBox is smaller than expected, considering the Height and a Width properties.
    For example, there is a PictureBox with Height = 200 and Width = 400 points.
    When I draw a point with coordinates of (0,0) it is clearly visible in the topleft corner. But when I draw a point with coordinates of (399,199), it's not visible. Actually, the bottommost and rightmost point in the Picturebox seems to have the coordinates of (397,197).

    What's the reason behind this? Is the PictureBox always two points smaller, or is it size-dependent? Or a wrong setting?

    Thanks,

    Jimmy

  2. #2
    PowerPoster keystone_paul's Avatar
    Join Date
    Nov 2008
    Location
    UK
    Posts
    3,327

    Re: Visible surface of Picturebox is too small

    What is the border style of your picture box?

    If its set to none I can draw up to the last pixel (399,199) but if it is set to fixed single of fixed 3d then part of the visible area is taken up with the border.

  3. #3

    Thread Starter
    Junior Member
    Join Date
    Jun 2009
    Location
    Hungary
    Posts
    19

    Re: Visible surface of Picturebox is too small

    You're right, of course. The border style was fixed single. I didn't suspect it because I reasoned that the border should've covered the outermost 1-pixel stripe, thus reducing the visible part to (1,1) to (398,198).

    Thanks for the quick answer. Problem solved.

    Jimmy

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