devxlogo

ActiveDesktop – Check whether Active Desktop is enabled or not

Private Declare Function FindWindowEx Lib "user32" Alias "FindWindowExA" (ByVal _    hWnd1 As Long, ByVal hWnd2 As Long, ByVal lpsz1 As String, _    ByVal lpsz2 As String) As Long' return True if ActiveDesktop is activeFunction ActiveDesktop() As Boolean    Dim hWindow As Long        ' get the handle of Program Manager window    hWindow = FindWindowEx(0, 0, "Progman", vbNullString)        ' search for its child SHELLDLL_DefView window    If hWindow Then        hWindow = FindWindowEx(hWindow, 0, "SHELLDLL_DefView", vbNullString)        ' finally, search for the Internet Explorer_Server grandchild window        If hWindow Then            ' if this call returns a non-zero handle, the computer            ' is using ActiveDesktop            If FindWindowEx(hWindow, 0, "Internet Explorer_Server", _                vbNullString) Then                ActiveDesktop = True            End If        End If    End If    End Function

Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.

See also  Seven Service Boundary Mistakes That Create Technical Debt

About Our Editorial Process

At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.

See our full editorial policy.