944,161 Members | Top Members by Rank

Ad:
Nov 6th, 2007
0

Visual basic 6 picture background problem

Expand Post »
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
Similar Threads
Reputation Points: 10
Solved Threads: 0
Light Poster
locsin is offline Offline
47 posts
since Aug 2007
Nov 6th, 2007
0

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!
Reputation Points: 28
Solved Threads: 71
Posting Pro
ryan_vietnow is offline Offline
578 posts
since Aug 2007
Nov 6th, 2007
0

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.
Featured Poster
Reputation Points: 665
Solved Threads: 427
Posting Genius
debasisdas is offline Offline
6,406 posts
since Feb 2007
Nov 6th, 2007
0

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.
Reputation Points: 40
Solved Threads: 24
Junior Poster
SCBWV is offline Offline
125 posts
since Apr 2007

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in Visual Basic 4 / 5 / 6 Forum Timeline: Facing problem with creating different timezone on a vb form
Next Thread in Visual Basic 4 / 5 / 6 Forum Timeline: SQL in DataEnvironment....????





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC