Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem with screen resolutions

Status
Not open for further replies.

SSJ

Programmer
Sep 26, 2002
54
0
0
PT
I've a program(including the source code of course) that wasn't developed by myself, but it was developed to run in 1280x1224 pixels (I don't know why), I need to make this program run in a 800x600 resolution, therefore a big part of the forms don't show up on the screen with this resolution.
I need a quick way to convert this into this resolution if there is one... Perhaps there is some tool to help us solving this problems or will I need to manually resize all the forms and controls to the size I want them?

I don't have a very experience in designing GUI with VB, but I suppose that situations like this could be avoiding by doing correct resizing in the forms resize method, am I right? (Wich wasn't done here for what I see)

Any directions to follow would be appreciated.

cheers

 

Yes, using the resize event would be the way to go. It would be best if you can come up with an algorythm based upon percentages for the resizing of controls...
[tt]
Label1.Top = 30
Label1.Left = 30
Label1.Width = (Me.Width / 2) - 60
Text1.Top = Label1.Top + Label1.Height + 30
Text1.Left = Label1.Left
Text1.Width = Label1.Width
[/tt]

Good Luck

 
Can you not open the project/form in your required resolution and resize the controls manually before you compile it.Otherwise you might include a form_load event which resizes all the controls like in :

for i=0 to me.controls.count
me.controls(i).height=me.controls(i).height*0.8
next i

PK Odendaal
pko@942.co.za

 
well, that's what I was afraid of... this project has a huge amount of forms and it'll be a pain to manually resize them to the desired resolution, playing with the resize method also isn't easy there a lot of elements like font sizes, control position, etc
Anyway it seems that there is no easy way to do this :(

I have yet to have a decent look at VBResizer JohnYingling posted it looks that it might be a very useful tool for what I'm after. Maybe it will solve my problems.
 
A different approach would be to add a tab control to each form. MOVE (via copy / paste) the various controls from the 'original' form to seperate "TABS" on the tab control. Hopefully, there are some logical groups of controls, and you can label the tabs with something meaningful. From a user perspective there should be little problem with this, and programmatically there should be no problem at all, since -within the tab control- reference to the individula control may omit the tab page reference and it is still within scope.

MichaelRed
m.red@att.net

Searching for employment in all the wrong places
 
I concur with the TabControl approach. Probably the best solution you'll find because resizing controls is probably counter-productive (they were originally designed to be a certain size and that should still be necessary, even at 800x600).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top