Greetings!

I designed a simple program in VB6 with a background picture in my main menu form. but when i try to install this program to other computer having different resolution or sized in the screen settings my background picture appears not fit in the entire screen.


I used jpeg picture with a size of 800 x 600. same resolution of my working station screen resolution. when i try to install this program to other computer with the settings of 1024 x 768 resolution my picture background appear small and not fit to as menu background.

Anybody can help me how to set my background picture applicable to all screen resolution settings.

note:

my form is not mdiform coz this is the requirements.

thank in advance.

This is a guess:

(on Form_load event)
picture1.width=screen.width
picture1.height=screen.height

try it!

If you are not using the form itself to show the picture then trry to use a image control stretch the image and resize the control to the size of the form.

I ran into this on a commercial application I sell. It seems some of the new screens, particularly wide screen flat panels, return a different TwipsPerPixel. I was able to work around the issue by comparing the design resolution with the screen resolution being used (Screen.Width / Screen.TwipsPerPixelX) and adjusting the controls proportionally.

I found that it didn't matter if the picture was ont he form or in a control. Both were effected, as were text boxes and label controls. Find a widescreen o use for testing and take a look at what it does to your program.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.