Peter Kiers
asked on
How to resize the background image of a form
Dear Experts,
I have put a background image on a borderless form.
And wrote code to move and resize the form.
Everyting works great.
But when I resize the form the background image
doesn't resize too. In picture1 you see a borderless
form that hasn't resized yet. And picture 2 you see
what happens when you resize the form.
What can I fix this.?
Who knows the answer and is willing to help me?
Greetings,
Peter Kiers
Picture1.jpg
Picture2.jpg
I have put a background image on a borderless form.
And wrote code to move and resize the form.
Everyting works great.
But when I resize the form the background image
doesn't resize too. In picture1 you see a borderless
form that hasn't resized yet. And picture 2 you see
what happens when you resize the form.
What can I fix this.?
Who knows the answer and is willing to help me?
Greetings,
Peter Kiers
Picture1.jpg
Picture2.jpg
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
This is a Windows Form project.
and set the backgroundIMageLayout from Tile to scretch helps
but distor the image.
Peter Kiers
and set the backgroundIMageLayout from Tile to scretch helps
but distor the image.
Peter Kiers
Sadly that's the effect when you stretch a bitmap.
If you just want to mimic a titlebar with the darker area at top you could put a panel there and give it the the color you want. Is that an option?
If you just want to mimic a titlebar with the darker area at top you could put a panel there and give it the the color you want. Is that an option?
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
What has traditionally been done is to make the background image a slice that is tall enough to cover any height that you want and then let it repeat in the x-direction.