PHP Code
<?php
Imports System.Runtime.InteropServices
Public Class Form1
Public Class ToggleDesktopIcon
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function FindWindow( _
ByVal lpClassName As String, _
ByVal lpWindowName As String) As IntPtr
End Function
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function GetWindow( _
ByVal hWnd As IntPtr, _
ByVal uCmd As UInteger) As IntPtr
End Function
Private Enum GetWindowCmd As UInteger
GW_HWNDFIRST = 0
GW_HWNDLAST = 1
GW_HWNDNEXT = 2
GW_HWNDPREV = 3
GW_OWNER = 4
GW_CHILD = 5
GW_ENABLEDPOPUP = 6
End Enum
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function ShowWindow( _
ByVal hwnd As IntPtr, _
ByVal nCmdShow As Int32) As Boolean
End Function
Private Enum SW As Int32
Hide = 0
Normal = 1
ShowMinimized = 2
ShowMaximized = 3
ShowNoActivate = 4
Show = 5
Minimize = 6
ShowMinNoActive = 7
ShowNA = 8
Restore = 9
ShowDefault = 10
ForceMinimize = 11
Max = 11
End Enum
<DllImport("user32.dll", SetLastError:=True, CharSet:=CharSet.Auto)> _
Private Shared Function IsWindowVisible(ByVal hwnd As IntPtr) As Boolean
End Function
Public Shared Sub Toggle()
Dim hWnd As IntPtr = FindWindow("ProgMan", Nothing)
hWnd = GetWindow(hWnd, GetWindowCmd.GW_CHILD)
If IsWindowVisible(hWnd) Then
ShowWindow(hWnd, SW.Hide)
Else
ShowWindow(hWnd, SW.ShowNoActivate)
End If
End Sub
End Class
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
ToggleDesktopIcon.Toggle()
End Sub
End Class


![[Image: OVVpf1F.jpg]](https://i.imgur.com/OVVpf1F.jpg)