Home » System & API » How to Show/Hide all Desktop Icons
How to Show/Hide all Desktop Icons
Posted on January 4, 2009
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | 'System & API - How to Show/Hide all Desktop Icons Option Explicit 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 Private Declare Function ShowWindow Lib "user32" (ByVal hwnd As Long, _ ByVal nCmdShow As Long) As Long Private Const SW_HIDE = 0 Private Const SW_SHOW = 5 Sub Main() Call HideDesktopIcons(True) 'To Hide Desktop Icons 'Call HideDesktopIcons(False) 'To Show Desktop Icons End Sub Public Sub HideDesktopIcons(ByVal blnHide As Boolean) Dim lHwnd As Long lHwnd = FindWindowEx(0, 0, "Progman", vbNullString) ShowWindow lHwnd, IIf(blnHide, SW_HIDE, SW_SHOW) End Sub |
Related posts:
- How to Show/Hide the Start Button from the task bar
- How to Show/Hide your SystemTray
- How to Set the ShowInTaskBar Property at Runtime
- How to Change the visibility of the app in the taskbar at runtime
- How to Hide/Show the Title bar at Run-Time
- How to Hide your Program from the Ctrl-Alt-Del Process list
- How to Get The Desktop Path
- How to Show/Hide ComboBox’s DropDown List
- How to show/hide the cursor/caret in a text box
- How to open a folder in explorer in particular folder view
Enjoy this article?
Filed under: System & API
Leave a comment
Sponsors
Link Back to us
Donations
If you are benefited from this site, please donate a small contribution to us. It will help to maintain this site better.