Click to See Complete Forum and Search --> : Resolution
Harini
July 28th, 2000, 03:31 PM
Hi,
I would like to know how can I keep the size of the forms the same irrespective of the systems resolution.
Right now I am giving the height and width of the forms explicitly and placing the forms as I need. But,if the systems resolution is changed then the forms are being displayed beyond the screen limits.
It would be great if you can give me any suitable suggestion to solve this problem.
Thanks
Harini
Even Impossible says I'm possible
July 29th, 2000, 05:37 AM
There is a way, but it involves using some Windows API functions - you find out the screen resolution and resize your forms, or even the controls on the forms as well. Ken Getz/Mike Gilbert show you how in "Access 97 Developer's Handbook", Sybex, ISBN: 0782119417. It's a superb book (superseded by the Access 2000 version) and comes with a brother (set) "VBA Developer's Handbook" ISBN: 0782119514 - both highly recommended. Alternatively, try searching sites like MVPS' site (http://www.mvps.org/) for example code snippets. Alternatively, abide by the Windows design guide and create your forms for 800x600 or whatever it is these days.
Mark
muraly
August 16th, 2000, 02:38 AM
try this and see, whether it's help or not
' Centre Form
Form1.Left = (Screen.Width - Form1.Width) / 2
Form1.Top = (Screen.Height - Form1.Height) / 2
Form1.WindowState = 2 'maximized - and this is optional
muraly
August 16th, 2000, 02:40 AM
continue....
pls place the code's in the Form_Load event...
sead
August 16th, 2000, 03:47 AM
I tried to do same thing by using SysInfo Control which have ability to track changes of resolution (and some other system events) but I didn't finished it yet. However, I found the event bellow as possibly useful:
SysInfo_DisplayChanged
- This is a SysInfo Control's event which occurs when system screen resolution changes. Comment from MSDN about this event is:
"Use this event to make any adjustments you need to the interface of your application due to changes in screen resolution."
I'm not sure that this is a right way to do this, but maybe you will give it a try ...
Good Luck
Sead
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.