Very late last night (Cebu time), the Sarge was musing about some of the newer additions to Circle Dock and wondered if it would be possible to have a small command-line utility that would hide or show the icons on the Windows Desktop. He, being a marketing type, believes that such a program would be rather popular and basically "threw-down the gauntlet" challenging me to come up with such a program.

Well, Sarge, I have risen to your challenge and released "CleanDesktop" which does precisely what you asked for - and then some! Not only can it hide, show or toggle the visibility of the Windows Desktop Icons but also it can do the same for the Sidebar and its gadgets. Both items can be controlled independently or together using its command-line options.

The download zip file contains both the executable program and a "read-me" file that explains the various options.

FWIW, on my XP SP3 32-bit: -HideIcons and -ShowIcons work but -ToggleIcons has no effect. -HideAll and -ShowAll work but -ToggleAll has no effect.

Unfortunately I don't have access to PC with XP loaded right now - but will have in ten days' time when I'm back in the UK for a few weeks.

The problem with XP is that the Desktop Icons are contained within a child window of a hidden window. This means that IsWindowVisible() will always return false because even if the child window is visible, the function returns false because its parent is hidden. If a parent window is itself hidden, you can not determine whether any of its child windows are visible or hidden.

In windows XP, and earlier, it worked like a champ. In Vista was hit and miss, and in Windows 7 would work reliably, IF you did not run any of Windows Desktop changer programs for the background There is also the issue that Windows and the way it handles Hiding desktop Icons changed between XP, Vista and 7

This was the answer to this problem, as Markham's tool in Circle Dock proved not to screw things up in Windows 7, or rather was properly compatible.

I also intend to use this a s Promo tool for Circle Dock in as much:"You like this try the whole package"

But there has also been a call for a stable, small, and compatible program for some time.

The problem with XP is that the Desktop Icons are contained within a child window of a hidden window.

Thanks for the reply and explanation.My comment was not intended as a complaint, merely a report.

No no; you are fine We take in everything It is nice to have such a broad user platform so that things do not get missed.

I was explaining that there was an original tool, and this is what drove me to requests a part-out from Circle Dock, as many folks would appreciate such an item, but has not been made available, reliable and stable for Vista and 7 users.

If you are running XP...I highly recommend the program listed in the tutorial in my previous post. I used it for years, but is getting frustrating in the Windows 7 environment

Thanks for the reply and explanation.My comment was not intended as a complaint, merely a report.

Chris,

Thank you for reporting it - which made me go back, look at the problem more carefully and make changes to the program's documentation.

Under XP, Desktop Icons are painted in a (n unnamed) child window whose parent is "Program Manager". For experimental purposes, I've recoded the "-ToggleIcons" code for XP to briefly show the parent window long enough to determine if its child is visible or hidden.

Thank you for reporting it - which made me go back, look at the problem more carefully and make changes to the program's documentation.

Under XP, Desktop Icons are painted in a (n unnamed) child window whose parent is "Program Manager". For experimental purposes, I've recoded the "-ToggleIcons" code for XP to briefly show the parent window long enough to determine if its child is visible or hidden.

Perhaps you'd care to test it?

Thanks for taking the trouble, Mark!

The -show / -hide options work fine.The -toggle options work fine to hide the icons but not to make them visible again.In order to make the toggled-off icons visible, I have to kill off explorer.exe and launch another instance of it.With icons toggled off, reissuing "cleandesktop -toggleicons" does make the parent visible for an instant.

Sorry to be an inadvertent troublemaker, usually it's deliberate on my part

Yeah, I read it, just read it again, but I don't see any instruction that I can use. I'm not usually empty-headed but I can't see what I'm missing?

Greeting Karmat Welcome to DonationCoder.com and Circle Dock's little corner of it all.

You are not missing anything, it is a matter of Command Line entries in Shortcuts.I must apologize for us old timers as we grew up in a command line world and have a bit of knowledge around it.Therefore I will have to come up with a tutorial on how to implement this, but not today, as I have 3 doctors appointments later this afternoon.

That being said; I will try and give you the jist of what you will want to know.The secret is in ADDING the additions in the help file to the shortcut

You can go ahead and place the exe file and the help file wherever is convenient.You can do this because, we are going to make a shortcut that directs to this. In my case I created a CleanDesktop Folder and placed it in my Program Files (Alternative) folder (which I also created to install programs and avoid the UAC B.S., among other things, when necessary; which is not necessary here .

Noe I am doing this from a Windows 7 perspective, so bare with me

Create your short cut that paths to the ClenDesktop.exeName your Shortcut whatever you like (I named mine Clean Desktop )Now once that shortcut is created, right click on it and open properties.Then to go the Shortcut tab.

In here we are concerned wit the TARGET path.May look similar to the following:

To avoid getting teh DOS screen from popping up, in teh properties window you are in, simply change the "Run" from "Normal Window" to "Minimized". This will prevent that annoying DOS window from popping up in teh middle of what ever you are doing and keep the function in teh task bar so you do not see it

Then click "OK" and you are done.

This shortcut can then be added to a Quick Launch bar or in seven can be "Pinned" to the Task Bar. Even though Circle Dock has this function built in, it can also be added to Circle Dock, or any other App Launcher.After all; it is only just a shortcut

I hope this helps folks, and I will take the time to make a full tutorial in the next few days, when I can get an opportunity between the Doctors appointments and a new contract.

[/url])[/i]To avoid getting teh DOS screen from popping up, in teh properties window you are in, simply change the "Run" from "Normal Window" to "Minimized". This will prevent that annoying DOS window from popping up in teh middle of what ever you are doing and keep the function in teh task bar so you do not see it

Just out of curiosity (not trying to be difficult, but...) if the command window is an issue, being that there's no requirement for console output, why compile the app as a CLI? A standard (WinMain) application can still be used from a command prompt, yet doesn't require (or load) one.

CLI applications are the preserve of C++, I believe, and CleanDesktop is written in C#.

Just to screw the Sarge's Tutorial , I've altered it so that there's no ugly "Dos Box" (which displayed the command-line parameters if there were none) but it will provide help in the absence of any valid command-line parameters.