|
-
March 12th, 2001, 05:24 AM
#1
Screen Resolution
Is there any ocx or any one can give me sample code uising which my form will remain unaffected even if the screen resolution is increased or decreased ?
Thanks,
[email protected]
-
March 12th, 2001, 01:28 PM
#2
Re: Screen Resolution
Sheridan Resize control is pretending to do that, but does it not so good. Actually, if your form contains intrinsic Combo Box, it can be a problem with all resizers, because there is no way to change the height of Combo (only by changing its font, which is not flexible enough). Try to play with Sheridan (www.shersoft.com), they give fully functional trial version.
Vlad
-
March 12th, 2001, 08:58 PM
#3
Re: Screen Resolution
I've had some success using code from the Access97 Developer's Handbook (3rd edition, Sybex)Chapter 8 - "Screen Resolution and distributing forms". The code uses API calls and of course needs to be altered for use with VB vs. Access. Mainly most of the references to portions of an Access form have to be removed.
Best Regards, Roy Kalin
-
March 13th, 2001, 07:08 AM
#4
Re: Screen Resolution
The following is a simple code that you can use to make a form designed in 800x600 mode uniform over all resolutions.
private Sub Form_Load()
on error resume next
Dim CtrlVar as Control
Xratio = Screen.Width / (Screen.TwipsPerPixelX * 800)
Yratio = Screen.Height / (Screen.TwipsPerPixelY * 600)
for Each CtrlVar In FrmVar.Controls
CtrlVar.Left = CtrlVar.Left * Xratio
CtrlVar.Top = CtrlVar.Top * Yratio
CtrlVar.Width = CtrlVar.Width * Xratio
CtrlVar.Height = CtrlVar.Height * Yratio
CtrlVar.Font.Size = CtrlVar.Font.Size * XRatio
next CtrlVar
End Sub
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|