Tag Archives: computer screen

How to get the Computers Monitor Display Resolution using VB 2005 and Higher

Click Star to Rate Post
1 Star2 Stars3 Stars4 Stars5 Stars (No Ratings Yet)

This shows how to use the MY interface to check what the resolution is for the Primary Display. This will return the size in Pixels. Since i’m using the MY interface, the code will only work with VB.NET 2005, VB 2008, and Visual Basic 2010.


'Get the displays current Resolution.
MsgBox("Resolution is: " & My.Computer.Screen.Bounds.Width.ToString & "x" _
    & My.Computer.Screen.Bounds.Height.ToString & " Pixels")