The option Strict throws me an error of Late Binding, I always cast the objects to the proper type but in this specific case I don't know how to cast this object.
The warning occurs in the instruction Shell.ToggleDesktop()
Here is the code:
''' <summary>
''' "Shell" CLASSID.
''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/bb776890%28v=vs.85%29.aspx
''' </summary>
Private Shared ReadOnly CLSIDShell As New Guid("13709620-C279-11CE-A49E-444553540000")
''' <summary>
''' Gets the objects in the Shell.
''' Methods are provided to control the Shell and to execute commands within the Shell.
''' There are also methods to obtain other Shell-related objects.
''' MSDN Documentation: http://msdn.microsoft.com/en-us/library/windows/desktop/bb774094%28v=vs.85%29.aspx
''' </summary>
Private Shared ReadOnly Property Shell As Object
Get
If _Shell Is Nothing Then
_Shell = Activator.CreateInstance(Type.GetTypeFromCLSID(CLSIDShell))
Return _Shell
Else
Return _Shell
End If
End Get
End Property
Private Shared _Shell As Object = Nothing
''' <summary>
''' Shows or hides the desktop.
''' </summary>
Friend Shared Sub ToggleDesktop()
Shell.ToggleDesktop()
End Sub