need to know how to Get the Current Screen Resolution (VB.NET)

Recommended Answers

All 4 Replies

Hi - I haven't done it, but I think you would need to create a custom control for this. So you would create a control that onload gets the Screen.PrimaryScreen.Bounds (but it needs to be a user control, because otherwise it will return the server screen and that's no good!) and then you will need to pass that back to the server.

Anyone with any other ideas?

Hi use this..

Public Function ScreenResolution() As String
        Dim intX As Integer = Screen.PrimaryScreen.Bounds.Width
        Dim intY As Integer = Screen.PrimaryScreen.Bounds.Height
        Return intX & " X " & intY
End Function
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.