Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6834261
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T23:05:23+00:00 2026-05-26T23:05:23+00:00

Is there any way of getting the monitors optimal resolution in vb?

  • 0

Is there any way of getting the monitors optimal resolution in vb?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T23:05:23+00:00Added an answer on May 26, 2026 at 11:05 pm

    Optimal Resolution Based on Advices

    If you want the optimal resolution for a CRT then you can follow Microsoft’s advice (because there is no native resolution for a CRT):

    For a CRT monitor, it’s important to change the screen resolution to
    the highest resolution available that provides 32-bit color and at
    least a 72-Hertz refresh rate.

    If you want the optimal resolution for a LCD monitor then you have to use its native resolution. Usually it’s the highest resolution available for the monitor.

    Ways of Getting Optimal Resolution

    You can get resolution information from various sources:

    1. Windows API (with User32.dll)
    2. DirectX (using the SDK)
    3. Windows Management Instrumentation (a.k.a. WMI)

    Optimal Resolution Based on VB Code

    I’ll use some WMI to query the resolution informations. We can use the Win32_VideoSettings class which gives us available resolutions by video controller but I had some funny/sad/empty results with it. For this one, I’m using the CIM_VideoControllerResolution class directly to get the maximum resolution:

    Imports System.Management
    '...
        Public Function GetMaximumResolution() As ManagementObject
    
                Dim className As String = "CIM_VideoControllerResolution"
                Dim computerName As String = "."
    
                Dim managementPath As New ManagementPath("\\" & computerName & "\root\cimv2:" & className)
                Dim scope As New ManagementScope(managementPath)
    
                Dim videoCtrlrRes As ManagementObjectCollection
                Using searcher As ManagementObjectSearcher = New ManagementObjectSearcher("select * from " & className)
                    searcher.Scope = scope
                    videoCtrlrRes = searcher.Get()
                End Using
    
                Dim videoCtrlrResList As New List(Of ManagementObject)
    
                For Each videoCtrlResItem In videoCtrlrRes
                    'Console.WriteLine(videoCtrlResItem("Description"))
                    videoCtrlrResList.Add(videoCtrlResItem)
                Next
    
                Dim maximumResolution As ManagementObject = videoCtrlrResList.
                    OrderBy(Function(vidSetting) vidSetting("HorizontalResolution")).
                    ThenBy(Function(vidSetting) vidSetting("VerticalResolution")).
                    ThenBy(Function(vidSetting) vidSetting("NumberOfColors")).
                    LastOrDefault()
                'Console.WriteLine(maximumResolution("Description"))
    
                Return maximumResolution
            End Function
    

    Note: if you want to get the resfresh rate, you can get it with the ‘RefreshRate’ property (ex. vidSetting(“RefreshRate”) )

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm looking to see if there is any way of getting around type erasure
Is there any way to skip the builds getting kicked off automatically when certain
I know there has to be a way: I need help getting any hot
Is there any way of getting the pixel location or the (x,y) points on
I know this is a long shot but is there any way of getting
Is there any way of getting the weather forecast from woeid in javascript? I
Is there any way of getting a list of registered listeners for an EventDispatcher
Is there any specific way of getting client's date and time without using any
Is there any way of getting the average value of an array of value
Is there any way of getting to know who has bought your app on

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.