Detect Screen Resolution

  • Thread starter Thread starter A. Gaubatz
  • Start date Start date
A

A. Gaubatz

Does anyone know a fast and easy way of detecting the user's current
screen resolution in VB.NET?

Thanks in advance,
 
A. Gaubatz said:
Does anyone know a fast and easy way of detecting the user's current
screen resolution in VB.NET?

Thanks in advance,

Dim ScrnRes As Rectangle = Screen.PrimaryScreen.Bounds
Dim W As Integer = ScrnRes.Width
Dim H As Integer = ScrnRes.Height

Also remember -

Dim ScrnRes As Rectangle = Screen.PrimaryScreen.WorkingArea

Hope this helps

ShaneO

There are 10 kinds of people - Those who understand Binary and those who
don't.
 
If you are using .Net 2.0, you can use:

My.Computer.Screen.PrimaryScreen.Bounds.Height
My.Computer.Screen.PrimaryScreen.Bounds.Width
 
Back
Top