Handling screen resolution in vbpro??? 
Author Message
 Handling screen resolution in vbpro???

i am writing a program for distribution.  while i was working away i
thought about screen resolutions????  i currently work in 1024x768 large
fonts(maybe).  but when i create an exe file and change screen
resolutions the forms get all messed up.  since i was working in a very
small font, the forms became very large when the screen resolution was
changed to 800x600 or larger.  
i would like the forms to appear the same in any font size? is that
possible.

this sounds like a pretty difficult thing to control.  maybe i am not
seeing something.   i would appreciate any suggestions thank



Sun, 17 May 1998 03:00:00 GMT  
 Handling screen resolution in vbpro???


Quote:
>i am writing a program for distribution.  while i was working away i
>thought about screen resolutions????  i currently work in 1024x768 large
>fonts(maybe).  but when i create an exe file and change screen
>resolutions the forms get all messed up.  since i was working in a very
>small font, the forms became very large when the screen resolution was
>changed to 800x600 or larger.  
>i would like the forms to appear the same in any font size? is that
>possible.

When you use 800x600 (or higher) with 'Large Fonts' Windows uses a
different logical DPI for the display compared to the same resoultion
using 'Small Fonts'. You can use the API function called GetDeviceCaps
to verify this. VB does not detect the difference and scales and
positions the controls/forms according to the logical DPI. I have not
found a graceful way of avoiding this problem.

--
Dean Hutchings
Edge Solutions, Inc.



Sun, 17 May 1998 03:00:00 GMT  
 Handling screen resolution in vbpro???

Quote:

> i am writing a program for distribution.  while i was working away i
> thought about screen resolutions????  i currently work in 1024x768 large
> fonts(maybe).  but when i create an exe file and change screen
> resolutions the forms get all messed up.  since i was working in a very
> small font, the forms became very large when the screen resolution was
> changed to 800x600 or larger.
> i would like the forms to appear the same in any font size? is that
> possible.

> this sounds like a pretty difficult thing to control.  maybe i am not
> seeing something.   i would appreciate any suggestions thank

Here is my 2 cents on the subject.

1) Design your forms to the lowest common denominator, for example
640X480.

2) Create multiple forms for different resolutions, for example
        MAIN  (800X600)
        MAIN  (1024X768)
then check for the users video mode and load the appropriate forms.

I don't like either of the answers but have not heard of anything better.



Sun, 17 May 1998 03:00:00 GMT  
 Handling screen resolution in vbpro???
Quote:
>> i would like the forms to appear the same in any font size? is that

possible. <<

Look for a VBX called "ReSize.VBX"  I know for sure that it is avaliable on Compuserve in the MSBASIC forum.  Search the keyword "Resize".

This really works good.  

Another note:

You should be developing your applications in 640x480 to begin with.  It will make things much easier as far as resizing things.

Hope this helps.

Sam



Mon, 18 May 1998 03:00:00 GMT  
 Handling screen resolution in vbpro???

Quote:
>Here is my 2 cents on the subject.

>1) Design your forms to the lowest common denominator, for example
>640X480.

>2) Create multiple forms for different resolutions, for example
>    MAIN  (800X600)
>    MAIN  (1024X768)
>then check for the users video mode and load the appropriate forms.

>I don't like either of the answers but have not heard of anything better.

You should try VideoSoft's VSVBX elastics... They resize everything
during runtime and allow you to 'lock' controls, etc in one spot plus
many other uses.  Creating multiple forms is really NOT the way to go,
especially with all the LS/SF options and drivers for each video
card..

Mike
    /////    ////    ////  Business Computers & Communications, Limited
   //  //  //  //  //  //  Professional & Technical Business Services
  /////   //      //       23 Panmure Street, Brechin, Angus DD9 6AR UK
 //  //  //  //  //  //    Phone +44 1224 580833  Fax +44 1356 625756  



Mon, 18 May 1998 03:00:00 GMT  
 Handling screen resolution in vbpro???

Quote:

>i am writing a program for distribution.  while i was working away i
>thought about screen resolutions????  i currently work in 1024x768 large
>fonts(maybe).  but when i create an exe file and change screen
>resolutions the forms get all messed up.  since i was working in a very
>small font, the forms became very large when the screen resolution was
>changed to 800x600 or larger.  
>i would like the forms to appear the same in any font size? is that
>possible.
>this sounds like a pretty difficult thing to control.  maybe i am not
>seeing something.   i would appreciate any suggestions thank

Here are the (rough) guidelines I follow.

1. Test you application on a Standard VGA (640x480, Small Fonts). Until you
get used to what this allows you should probably design your user interface
in this resolution. You should also make sure your application looks good
with different numbers of colours (e.g. 16, 256, 32K) and different colour
settings from the control panel.

2. All forms should be designed using the standard MS Sans Serif 8.25pt
font (although I turn bold off to give them more of a Windows'95 look).
Windows will automatically adjust the fonts for large font drivers.

3. Document-type windows should be given a sizeable border and should
respond to the resize event to fill the window (such as making a grid fill
the window).

4. Dialog-box windows (which seem to make up the majority of VB forms)
should be given a fixed double border. There is no need to resize these
(except in very rare cases) since the user may have customised windows and
picked settings (such as resolution and font size) which they are
comfortable with.

5. If setting colours of controls you should try to pick "standard" colours
in preferance to hard-coded colours. These are colours from &h80000000& to
&h80000012&. They are customisable from the control panel. For example, if
you want to give your form a "grey" background, use &h8000000f& instead of
&h0c0c0c0& as this will use whatever colour your buttons are set to. This
is more important under Windows'95 as it is more common to pick non-grey
colours for 3d objects.

6. Don't interfere with the workings of Windows. Many programmers moving to
Windows want to force their program to always run full screen ("How do I
disable the Alt-Tab key?"). Many users want to use you application in
conjunction with their other Windows applications. Anything non-standard
interferes with this.

7. It is usually a good idea to use an MDI form (assuming you application
has more than one form). If you're doing this, allow users to open multiple
forms (and, if appropriate, multiple instances of the same form) along-side
each other.

8. If it is getting difficult to fit all the controls for a form on VGA,
then it is probably getting difficult for the user to see whats going on.
You should split up such forms either by using one of the many Tabbed
Dialog box controls now available, or by using several forms. It doesn't
really matter which, just try to keep it simple.

That's about all I can think of at the moment. Perhaps some of you would
like to add to this list (or reject some of mine as absurd).

Hope this is of some help to somebody.

James Shields



Mon, 18 May 1998 03:00:00 GMT  
 Handling screen resolution in vbpro???


<snip>

Quote:
>2. All forms should be designed using the standard MS Sans Serif 8.25pt
>font (although I turn bold off to give them more of a Windows'95 look).
>Windows will automatically adjust the fonts for large font drivers.

<snip>

MS Sans Serif is a "screen font" and can change between video adapters
and even between different screen resolutions/color depths on the same
video adapter.

--
Dean Hutchings
Edge Solutions, Inc.



Tue, 19 May 1998 03:00:00 GMT  
 
 [ 7 post ] 

 Relevant Pages 

1. Handle multi screen resolutions?

2. Handling various screen resolutions?

3. Changing screen resolution in full-screen programs?

4. Changing screen resolution in full-screen programs?

5. Screen coordinates change after changing screen resolution???

6. Handling Resolution Differences

7. Different resolutions - how to handle

8. Resolution Handling

9. Resolution Handling in VB

10. Resolution Handling

11. How to Change Screen Resolution in VBA

12. Screen resolution problem

 

 
Powered by phpBB® Forum Software