Assume you have Windows Forms Project open, and PictureBox on the Form.
1. for this solution you might use this image[
^], which is a 200x100px .png file (no transparency) on which white text appears on a black background, and there is an "interior border" 15 pixels thick on all sides of the image.
2. set the above image to be the PictureBox's Image.
3. set the 'SizeMode of the PictureBox to 'CenterImage.
4. now calculate the actual part of the image you wish displayed : since you wish to crop 15 pixels around the whole image: it will be 30 pixels less in height, 30 pixels less in width: so set the PictureBox size to to 170x70.
5. now run your project: observe the white margin is cropped.
In other circumstances, more complex solutions may be required where you actually have to go through Graphics operations.
And, of course, the simplest solution of all is to crop the image in some simple image editor before you use it ... but ... if you want to show the white margin sometimes, but hide it other times, you can still achieve this by simply changing the size of the PictureBox.