|
-
June 23rd, 2001, 06:25 AM
#1
Screen Resoluiton
Hi everyone,
I am having problem with the screen resolution in VB. how can i make my project( the screen designing) to look good on every system ?
-
June 23rd, 2001, 07:44 AM
#2
Re: Screen Resoluiton
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
-
October 11th, 2001, 08:45 PM
#3
Re: Screen Resoluiton
Actuallu i find it's not working well. The calculation for XRatio and YRatio is incorrect. Maybe we need to use other property something? like scalex?
Thanks!
Best Regards,
Kevin Shen
Best Regards,
Kevin Shen
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
|