Screen Resolutions

  • Thread starter Thread starter Me
  • Start date Start date
M

Me

I am about to roll out a vb.net 2003 app for screens
using 1024x768.

However some users will only have 800x600. Is there
a quick method of scaling down the screens already written
(e.g. SystemMetrics or Anchor points etc....) for these
users ? There are no bitmaps or images in this app, only
textboxes, listviews, forms and buttons.

TIA
Me
 
* "Me said:
I am about to roll out a vb.net 2003 app for screens
using 1024x768.

However some users will only have 800x600. Is there
a quick method of scaling down the screens already written
(e.g. SystemMetrics or Anchor points etc....) for these
users ? There are no bitmaps or images in this app, only
textboxes, listviews, forms and buttons.

Have a look at the controls' 'Anchor' and 'Dock' properties and/or at
the form's 'Scale' method.
 
Hi Me,

I never used it (written 10 minutes ago), however when I saw your message I
had to think on this.
You can try it,

Can be fun with a timer I did think: zooming in and out, but to keep it
simple for you I did not paste that code in.

Give some message if it works for you?

Cor

\\\
Private Sub Button1_Click(ByVal sender As System.Object, _
ByVal e As System.EventArgs) Handles Button1.Click
Me.Width = CInt(Me.Width * 0.8)
Me.Height = CInt(Me.Height * 0.8)
Dim nada As New doCtr(Me)
End Sub
End Class
Public Class doCtr
Public Sub New(ByVal parentCtr As Control)
Dim ctr As Control
For Each ctr In parentCtr.Controls
ctr.Left = CInt(ctr.Left * 0.8)
ctr.Top = CInt(ctr.Top * 0.8)
ctr.Width = CInt(ctr.Width * 0.8)
ctr.Height = CInt(ctr.Height * 0.8)
Dim newdoCtr As _
New doCtr(ctr)
Next
End Sub
///
 
Yes that's just what's needed - nice and quick too.
-Your timer idea also sounds like a nice 'feature' to
try on someone...

Thanks
 
* "Me said:
I forgot to ask... How can I tell the current
Screen res ?

'SystemInformation.PrimaryMonitorSize'
'SystemInformation.WorkingArea'
'SystemInformation.VirtualScreen'
'Screen.PrimaryScreen.Bounds'
'Screen.PrimaryScreen.WorkingArea'

When using more than one screen:

'Screen.AllScreens'
 
Back
Top