Searching...
9:47 PM

Hide/ Show Desktop icons VB6 Code

Code:

Public 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
Public Declare Function ShowWindow Lib "user32" (ByVal hWnd As Long, ByVal nCmdShow As Long) As Long

Public Function HideDesktopIcons()
    Dim lDesktopHwnd As Long
    Dim lFlags As Long
    On Error Resume Next
    lDesktopHwnd = FindWindowEx(0&, 0&, "Progman", vbNullString)
    ShowWindow lDesktopHwnd, 0
End Function

Public Function ShowDesktopIcons()
    Dim lDesktopHwnd As Long
    Dim lFlags As Long
    On Error Resume Next
    lDesktopHwnd = FindWindowEx(0&, 0&, "Progman", vbNullString)
    ShowWindow lDesktopHwnd, 1
End Function

0 comments:

Post a Comment

 
Back to top!