Visual basic 6 picture background problem

Thread Solved

Join Date: Aug 2007
Posts: 47
Reputation: locsin is an unknown quantity at this point 
Solved Threads: 0
locsin locsin is offline Offline
Light Poster

Visual basic 6 picture background problem

 
0
  #1
Nov 6th, 2007
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.
Last edited by locsin; Nov 6th, 2007 at 3:21 am. Reason: i forget the programming language
Reply With Quote Quick reply to this message  
Join Date: Aug 2007
Posts: 561
Reputation: ryan_vietnow is an unknown quantity at this point 
Solved Threads: 71
ryan_vietnow's Avatar
ryan_vietnow ryan_vietnow is offline Offline
Posting Pro

Re: Visual basic 6 picture background problem

 
0
  #2
Nov 6th, 2007
This is a guess:

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

try it!
Reply With Quote Quick reply to this message  
Join Date: Feb 2007
Posts: 2,092
Reputation: debasisdas will become famous soon enough debasisdas will become famous soon enough 
Solved Threads: 125
debasisdas's Avatar
debasisdas debasisdas is offline Offline
Postaholic

Re: Visual basic 6 picture background problem

 
0
  #3
Nov 6th, 2007
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.
Share your Knowledge.
Reply With Quote Quick reply to this message  
Join Date: Apr 2007
Posts: 102
Reputation: SCBWV is an unknown quantity at this point 
Solved Threads: 14
SCBWV SCBWV is offline Offline
Junior Poster

Re: Visual basic 6 picture background problem

 
0
  #4
Nov 6th, 2007
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.
Reply With Quote Quick reply to this message  
Reply

This thread has been marked solved.
Perhaps start a new thread instead?
Message:



Similar Threads
Other Threads in the Visual Basic 4 / 5 / 6 Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC