DaniWeb IT Discussion Community

DaniWeb IT Discussion Community (http://www.daniweb.com/forums/index.php)
-   Visual Basic 4 / 5 / 6 (http://www.daniweb.com/forums/forum4.html)
-   -   Visual basic 6 picture background problem (http://www.daniweb.com/forums/thread95652.html)

locsin Nov 6th, 2007 3:18 am
Visual basic 6 picture background problem
 
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.

ryan_vietnow Nov 6th, 2007 3:40 am
Re: Visual basic 6 picture background problem
 
This is a guess:

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

try it!

debasisdas Nov 6th, 2007 6:01 am
Re: Visual basic 6 picture background problem
 
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.

SCBWV Nov 6th, 2007 9:32 am
Re: Visual basic 6 picture background problem
 
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.


All times are GMT -4. The time now is 8:18 pm.

Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2009 DaniWeb® LLC