Get current screen resolution in VB.NET

Get current screen resolution in VB.NET

To get the current screen resolution in VB.NET you can use the Bounds.Height and Bounds.Width properties as such:

Dim screenHeight As Integer = My.Computer.Screen.Bounds.Height

Dim screenWidth As Integer = My.Computer.Screen.Bounds.Width

MsgBox("Your current screen resolution is: " & screenWidth & "x" & screenHeight)

Leave a Reply

Your email address will not be published. Required fields are marked *

Back To Top