Implement a test for the desktop visibility based on the MSDN article