473,491 Members | 1,965 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to strech the background image in a MDI Parent form?

The image I set as background are left at original size. In a picturebox, I
can decide to strech the image. Can I do that to fill my background ?

Regards

GB
Dec 26 '05 #1
7 2603
question is not clear

PK

Georges Bessis wrote:
The image I set as background are left at original size. In a picturebox, I
can decide to strech the image. Can I do that to fill my background ?

Regards

GB


Dec 27 '05 #2
question is not clear

PK

Dec 27 '05 #3

Sorry, must be my english.

In a MDI Form, I use the BackgroundImage property to set up a given BMP
(or JPEG) image as background. My image file has a given size (width X
height).
What I get is :
1) or partial vue of the image if the client area is too small
2) or multiple vues of the image if the client area is bigger in size
that the image.

Instead, I want this image to be streched (expended) to fill my form's
client area, and "autosize" to it. How can I do that?

Is my question clear now?

*** Sent via Developersdex http://www.developersdex.com ***
Dec 28 '05 #4
Have not tried myself, but here's an idea:

You can place a PictureBox to fill out the form's client area and then add
all the controls you need inside that picture box..

Let me know whether it solved your problem.

"Georges Bessis" wrote:

Sorry, must be my english.

In a MDI Form, I use the BackgroundImage property to set up a given BMP
(or JPEG) image as background. My image file has a given size (width X
height).
What I get is :
1) or partial vue of the image if the client area is too small
2) or multiple vues of the image if the client area is bigger in size
that the image.

Instead, I want this image to be streched (expended) to fill my form's
client area, and "autosize" to it. How can I do that?

Is my question clear now?

*** Sent via Developersdex http://www.developersdex.com ***

Dec 28 '05 #5
Hi Sergey,

I had the same idea. I put a pictureBox in my MDIParent and set my picture
in the Image property, with the "sizemode" property to "StechImage".

As far as streching is concerned, it works fine, but I am having a big
problem in keeping my MyChild forms visible : the PictureBox on my MDIParent
stays on top of any child form, which is not really convenient for a
"background image"!

I tried to set my MDIChild forms as "Topmost" but it does not help.

Any suggestion?

GB
"Sergey Poberezovskiy" <Se*****************@discussions.microsoft.com> a
écrit dans le message de news:
7C**********************************@microsoft.com...
Have not tried myself, but here's an idea:

You can place a PictureBox to fill out the form's client area and then add
all the controls you need inside that picture box..

Let me know whether it solved your problem.

"Georges Bessis" wrote:

Sorry, must be my english.

In a MDI Form, I use the BackgroundImage property to set up a given BMP
(or JPEG) image as background. My image file has a given size (width X
height).
What I get is :
1) or partial vue of the image if the client area is too small
2) or multiple vues of the image if the client area is bigger in size
that the image.

Instead, I want this image to be streched (expended) to fill my form's
client area, and "autosize" to it. How can I do that?

Is my question clear now?

*** Sent via Developersdex http://www.developersdex.com ***

Dec 30 '05 #6
Hi again, Sergey,

My original problem comes from the fact that my image size is fixed, and the
client area is variable.

I know there are methods in Windows programming to transform an image size,
using some API. This could be the solution, I guess : upon form resize
event, reload and adapt the size of my image dynamically. Basically it will
be done once, since most of the time, my app is running full screen, so not
a real performance problem.

Once upon a time, I knew how to do that, but just can't remember now. Do you
have any idea?

Regards

GB

"Sergey Poberezovskiy" <Se*****************@discussions.microsoft.com> a
écrit dans le message de news:
7C**********************************@microsoft.com...
Have not tried myself, but here's an idea:

You can place a PictureBox to fill out the form's client area and then add
all the controls you need inside that picture box..

Let me know whether it solved your problem.

"Georges Bessis" wrote:

Sorry, must be my english.

In a MDI Form, I use the BackgroundImage property to set up a given BMP
(or JPEG) image as background. My image file has a given size (width X
height).
What I get is :
1) or partial vue of the image if the client area is too small
2) or multiple vues of the image if the client area is bigger in size
that the image.

Instead, I want this image to be streched (expended) to fill my form's
client area, and "autosize" to it. How can I do that?

Is my question clear now?

*** Sent via Developersdex http://www.developersdex.com ***

Dec 30 '05 #7
Sorry, cannot help you there - never played with graphics - will be
interested to know if you figured out a way though..

Best of luck,

Sergey

"Georges Bessis" wrote:
Hi again, Sergey,

My original problem comes from the fact that my image size is fixed, and the
client area is variable.

I know there are methods in Windows programming to transform an image size,
using some API. This could be the solution, I guess : upon form resize
event, reload and adapt the size of my image dynamically. Basically it will
be done once, since most of the time, my app is running full screen, so not
a real performance problem.

Once upon a time, I knew how to do that, but just can't remember now. Do you
have any idea?

Regards

GB

"Sergey Poberezovskiy" <Se*****************@discussions.microsoft.com> a
écrit dans le message de news:
7C**********************************@microsoft.com...
Have not tried myself, but here's an idea:

You can place a PictureBox to fill out the form's client area and then add
all the controls you need inside that picture box..

Let me know whether it solved your problem.

"Georges Bessis" wrote:

Sorry, must be my english.

In a MDI Form, I use the BackgroundImage property to set up a given BMP
(or JPEG) image as background. My image file has a given size (width X
height).
What I get is :
1) or partial vue of the image if the client area is too small
2) or multiple vues of the image if the client area is bigger in size
that the image.

Instead, I want this image to be streched (expended) to fill my form's
client area, and "autosize" to it. How can I do that?

Is my question clear now?

*** Sent via Developersdex http://www.developersdex.com ***


Jan 2 '06 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
5304
by: erik | last post by:
Is it posssible to inherit the previous pages (parent pages) background image? Is there a script out there I could look at? Thanks
8
10578
by: Grahammer | last post by:
Is it possible to set the background of a usercontrol as transparent? I tried setting the background image of the usercontrol to a transparent GIF, but that caused MAJOR problems. I'm making...
2
3271
by: Ivan Weiss | last post by:
How can I stretch a background image to fit the size of my form (fitting underneath a toolbar and menu control I have on the top) and make it automatically resize whenever the form is resized. I...
5
12460
by: Bernie Yaeger | last post by:
It's trivial to have an image as the background in an mdi child form. What I can't seem to get done is place an image as the background of an mdi parent form. Is there a way to do this? Thanks...
7
4947
by: Paul Wake | last post by:
I'm missing something regarding positioning background images. It's probably obvious, and I hope someone here will note it for me. I'm trying to do something like the complex spiral thing, only...
0
2423
by: Miguel Pires | last post by:
Hi all, I have one Mdi Container (Parent) and on this form i wont to set a small image in bottom Right corner, i have insert a imagebox and all was ok until i open a mdi child form and move were...
8
10141
by: Brian Ward | last post by:
I am looking for a simple way to set the image transparency in a PictureBox. I have a moving PictureBox containing a graphic image .. moving by incrementing its Left property. The background...
3
5349
by: kirk | last post by:
I have a form with a PictureBox control on it. The .Image property is set to a PNG file(which shows the picture of the US map) with some transparency in it. The .BackColor property is set to...
9
7978
by: =?Utf-8?B?RnJhbmsgVXJheQ==?= | last post by:
Hi all I have a MDI Container Form, with one label control on the Background of this container form. When I now open a child form, this form is behind the label ... and this looks ugly ... :-))...
0
7115
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6978
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7154
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
6858
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
5451
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4578
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
1392
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
633
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
280
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.