[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
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.
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. :thumb: Problem solved.
Jimmy