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!

Resolution trouble

Status
Not open for further replies.

DK47

Programmer
Jun 3, 2003
118
0
0
US
I have just about completed a program that has taken many many hours. I've just about finished all the testing and I thought I was only a week or two away from deploying it.

The trouble I seem to have created for myself is that my monitor is capabable of 1280 x 1024 pixels although I have it set at 1024 x 768.

Being new to VB6 I was not aware that I should have designed my application 800 x 600 for a user with the smaller pixel capabilities to view the entire form and controls.

I have two questions regarding this.

1. Do all VB6 application designers work in that annoying low resolution or is there some way to work in the higher pixel range and still have the lower resolution monitors use the application?

2. And most important, is there any way to alter the settings on a program created at 1024 x 768 without redoing the entire program, forms and controls?

Thanks
Dwight
 
you can design the application for fit any resolution and for that u have to write some extra code in all forms

first of all you have deduct what is the resolution of the system @ present. (Use API )

then on each form resize the controls according to resolution. (Form1_Resize)

regards
KQKMBI


 
KQKMBI,
Thanks for your help.
I have a few questions.

Most applications(software products) seem to have the ability to compress the componants on the screen so that any monitor can view the entire page.
Is this possible with VB6?
Is that what the extra code you spoke of will do?
If you have the time could you give me an example of what this code would look like or tell me where I could find something relavent?

I have been able to tighten up my control graphics and do away with some logos and shorten up some data grids so they will all fit into the 800 x 600 resolution.
This severly limits my application's look and seems rather non-professional.

Thanks and many regards,
Dwight
 
In every form there is an event called Form1_Resize

Suppose you have a multiline textbox covers all of your screen

then you should set the forms Window State to maxzmize

and place the textbox on the left most top so that you dont have to define the TOP and LEFT.

then on resize event type the following code.

text1.height = me.height - 400
text1.width = me.width - 400

and see the form by changing the resolution the text box will be adjusted automatically.

change # 400 can be set according to your form

regards
KQKMBI
 
KQKMBI,
Totally appreciate you taking the time to help.
Thanks so much.
I'll try this on a form and let you know how I make out.

Regards,
Dwight
 
DK,

I have the same problem, although I solved this this:

Public Sub CheckResolution()
Dim lngX As Long
Dim lngY As Long

With Screen
lngX = .Width / .TwipsPerPixelX
lngY = .Height / .TwipsPerPixelY
End With
If (lngX < 800) And (lngY < 600) Then
MsgBox &quot;This application is best viewed at a screen&quot; _
& &quot; resolution of 800*600 or better.&quot;, _
vbInformation, &quot;Check Resolution&quot;
End If
End Sub


Andy
&quot;Logic is invincible because in order to combat logic it is necessary to use logic.&quot; -- Pierre Boutroux
&quot;Why does my program keep showing error messages every time something goes wrong?&quot;
 
Andy,
Thanks buddy, your code is good for letting a user know that he needs to view at higher resolution but what I need to do is make sure that a user that can &quot;only&quot; view below a certain standard can still use the program.
My hope was that there was code that could some how compress the entire page so that it can be viewed by the lower resolution monitor.
It now seems that that is not possible so I am working on using an option button on the application's setup page that will allow the user to indicate what monitor he is using and my code will re-arrange the controls and grids and hide some logos and unrequired graphics. The lower resolution user will not see the application's graphics at it's best but at least it will be usable.
If you know of any way I can compress the view I would appreciate the help.
I have already begun writing code to re-arrange the form and it's controls.

Thanks again for trying to help.
I continue to be impressed by the people I have met on this web site.

Regards,
DK
 
DK,

Do a search for &quot;Resizer+vb&quot; on Google. There are several ActiveX things out there which may help you. I did try one of these a few years back - when the form resized so did all of the controls on the form.


Andy
&quot;Logic is invincible because in order to combat logic it is necessary to use logic.&quot; -- Pierre Boutroux
&quot;Why does my program keep showing error messages every time something goes wrong?&quot;
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top