Zeeshan Yahya
Zeeshan Yahya

Reputation: 9

Background image gets cut off, even though form and image size match

I am trying to create a Ludo game using Windows Forms.
I have set the background to be the image of a ludo board, where both the image and the window have the same size (960x960). I cannot use the image stretch feature, as it will mess with the button positions on my Form.

The Form has the bottom and the right side of the background image trimmed off, even though the Form matches the size of the background image.

ludo game

Upvotes: 0

Views: 223

Answers (1)

user18387401
user18387401

Reputation: 2562

The Size of the form is the outer dimensions. You should set the ClientSize of your form to the Size of the Image, which you can do in code. That way, the image and form will look correct no matter what window chrome is or isn't present.

Upvotes: 1

Related Questions