devxlogo

ActiveDesktop – Check whether Active Desktop is enabled or not

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

devxblackblue

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.

About Our Journalist