Welcome Guest.   Make a donation to an author on the site April 25, 2014, 02:24:48 AM  *

Please login or register.
Or did you miss your validation email?


Login with username and password (forgot your password?)
Why not become a lifetime supporting member of the site with a one-time donation of any amount? Your donation entitles you to a ton of additional benefits, including access to exclusive discounts and downloads, the ability to enter monthly free software drawings, and a single non-expiring license key for all of our programs.


You must sign up here before you can post and access some areas of the site. Registration is totally free and confidential.
 
The N.A.N.Y. Challenge 2012! Download dozens of custom programs!
   
   Forum Home   Thread Marks Chat! Downloads Search Login Register  
Pages: [1]   Go Down
  Reply  |  New Topic  |  Print  
Author Topic: "CleanDesktop" - The Sarge's latest challenge to the developers!  (Read 5795 times)
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« on: May 23, 2010, 05:37:26 AM »

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.

The download is here - CleanDesktopV1.1.Zip


Enjoy!


Mark
« Last Edit: May 25, 2010, 05:36:26 AM by Markham » Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,158



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #1 on: May 23, 2010, 07:28:40 AM »

Thank you for making this available!

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.

Logged

Chris
Stoic Joker
Honorary Member
**
Posts: 4,883



View Profile WWW Give some DonationCredits to this forum member
« Reply #2 on: May 23, 2010, 08:58:13 AM »

Thank you for making this available!

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.


I can confirm said (XP SP3) behavior here also.
Logged
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #3 on: May 23, 2010, 12:07:55 PM »

Thank you for making this available!

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.



Mark


Mark
« Last Edit: May 23, 2010, 01:48:02 PM by Markham » Logged
sgtevmckay
Moderator
*****
Posts: 836


Magis Esse

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #4 on: May 23, 2010, 02:14:51 PM »

The entire concept that  drove me to request this little addition was developed from a seriously outdated software.
More info here:
http://www.howtogeek.com/howto/windows-vista/create-a-shortcut-or-hotkey-to-turn-the-desktop-icons-on-or-off/

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 Sad
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.
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,158



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #5 on: May 23, 2010, 03:49:17 PM »

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.
Logged

Chris
sgtevmckay
Moderator
*****
Posts: 836


Magis Esse

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #6 on: May 23, 2010, 03:55:54 PM »

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  Thmbsup
We take in everything Wink
It is nice to have such a broad user platform so that things do not get missed.  tongue

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  Thmbsup
Logged
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #7 on: May 23, 2010, 10:16:34 PM »

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.

Perhaps you'd care to test it? smiley


Mark



« Last Edit: May 24, 2010, 01:24:40 AM by Markham » Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,158



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #8 on: May 23, 2010, 10:51:42 PM »

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.

Perhaps you'd care to test it? smiley
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   Wink
Logged

Chris
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #9 on: May 24, 2010, 01:24:15 AM »

Okay, let's try this approach ...

Oh and I'm used to troublemakers - ask the Sarge!  Grin

« Last Edit: May 25, 2010, 05:35:21 AM by Markham » Logged
sgtevmckay
Moderator
*****
Posts: 836


Magis Esse

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #10 on: May 24, 2010, 01:53:17 AM »

Heeeeeeeeeyyyyyyyy  embarassed
I resemble that remark  Thmbsup
Logged
cranioscopical
Friend of the Site
Supporting Member
**
Posts: 4,158



see users location on a map View Profile Read user's biography. Give some DonationCredits to this forum member
« Reply #11 on: May 24, 2010, 08:03:47 AM »

Okay, let's try this approach ...

Oh and I'm used to troublemakers - ask the Sarge!  Grin
Grin
Is that the guy with the really, really small signature line?  tongue


Nothing like doing this blind, eh?
-hide / -show working fine
-toggle not working at all
Logged

Chris
karmat
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #12 on: May 24, 2010, 11:09:57 AM »

I'm on Windows7/64bit and just downloaded it. In right-click I enabled the 'Show Desktop Icons and Gadgets'.

Extracted the exe file to my Downloads folder. Clicked on it but only get a DOS-like window for a 1/2 second before it disappears and nothing else happens.

What am I doing wrong? I'd love to be able to use this, it sounds perfect!
Logged
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #13 on: May 24, 2010, 11:50:44 AM »

Did you read the text file that was also in the ZIP you downloaded?



Mark
Logged
karmat
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #14 on: May 24, 2010, 02:03:58 PM »

Did you read the text file that was also in the ZIP you downloaded?

Mark

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?
Logged
parkint
Supporting Member
**
Posts: 119


It's bad luck to be superstitious

see users location on a map View Profile Give some DonationCredits to this forum member
« Reply #15 on: May 24, 2010, 03:04:53 PM »


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.

Mark

May I suggest using VirtualBox to build an XP machine (image) for testing.  As a matter of fact, you can build multiple versions (SP1, SP2, etc) and use the same license!!
Logged

sgtevmckay
Moderator
*****
Posts: 836


Magis Esse

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #16 on: May 24, 2010, 04:12:13 PM »

Did you read the text file that was also in the ZIP you downloaded?

Mark

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  Wink

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 Wink.

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

Create your short cut that paths to the ClenDesktop.exe
Name 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:
[copy or print]
"C:\Program Files (Alternative)\Clean Desktop\CleanDesktop.exe"

Now we know what commands are available to us, because they are in the help file Wink
as below"
Quote

Usage:-
------

DesktopCleaner -option

Where '-option' is one of the following:-

-HideIcons   )
-ShowIcons   ) To hide, show or toggle Desktop Icons' visibility
-ToggleIcons *   )

-HideSidebar *   )
-ShowSidebar *   ) To hide, show or toggle the Sidebar Gadgets visibility
-ToggleSidebar *)

-HideAll   )
-ShowAll   ) To hide, show or toggle both items' visibility
-ToggleAll *    )

An asterisk following a parameter (eg -ToggleIcons) indicates that this command is
not available under Windows XP.

In the following instance I am going to use a toggle command line

For native windows Command lines in Shortcut instances, we need to add the addtional command to the end of the path that the shortcut has already established  Cool

So take take our path:
[copy or print]
"C:\Program Files (Alternative)\Clean Desktop\CleanDesktop.exe"

and we will add the following to the path
[copy or print]
-ToggleIcons

In order to add the command line properly to the path, there must be a space between the quotation mark (") at the end of the path and where the Command line begins.

Ultimately your Target code in your shortcut will have the path and the Command line all as one long code string which will look like the following:
[copy or print]
"C:\Program Files (Alternative)\Clean Desktop\CleanDesktop.exe" -ToggleIcons

In the shortcut properties it will 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  Wink

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  Wink

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.

But for now; Have Fun  Thmbsup
Logged
karmat
Participant
*
Posts: 3

View Profile Give some DonationCredits to this forum member
« Reply #17 on: May 24, 2010, 05:26:02 PM »

Hey Sarge, thanks for the tutorial! I would not have known how to do that on my own huh, but it worked perfectly!!! I placed the shortcut on my taskbar, easily accessed now. Thanks again! smiley

And thanks Mark for coming up with this, appreciate it! Thmbsup
Logged
sgtevmckay
Moderator
*****
Posts: 836


Magis Esse

see users location on a map View Profile WWW Read user's biography. Give some DonationCredits to this forum member
« Reply #18 on: May 24, 2010, 05:33:55 PM »

I am so glad that it has worked out for you

I will get something a little better going in teh next few days, in the way of a full tutorial
Logged
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #19 on: May 24, 2010, 08:39:26 PM »

Is that the guy with the really, really small signature line?  tongue
Yup, that is he. As he's in charge around here, you'd think he'd have a signature that makes a bold and impressive statement, wouldn't you?   undecided

Quote
Nothing like doing this blind, eh?
Ah you've noticed I'm using VB, then, Visual Braille!

Quote
-toggle not working at all
Now that's very strange because I'm using the same algorithm that someone developed for AutoIt which apparently does work. Oh well, back to the drawing board ...



Mark
Logged
Stoic Joker
Honorary Member
**
Posts: 4,883



View Profile WWW Give some DonationCredits to this forum member
« Reply #20 on: May 24, 2010, 10:20:31 PM »

[/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.

Just a thought.
Logged
Markham
Honorary Member
**
Posts: 404


see users location on a map View Profile WWW Give some DonationCredits to this forum member
« Reply #21 on: May 25, 2010, 05:34:17 AM »

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

Just to screw the Sarge's Tutorial  tongue, 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.



Mark

* CleanDesktopV1.1.zip (15.78 KB - downloaded 113 times.)
Logged
Stoic Joker
Honorary Member
**
Posts: 4,883



View Profile WWW Give some DonationCredits to this forum member
« Reply #22 on: May 25, 2010, 07:02:55 AM »

Cool thanks,

It's tempting to explore adding the same functionality to T-Clock - But I'm afraid I'd end up looking like a schmuck if I did.
Logged
Pages: [1]   Go Up
  Reply  |  New Topic  |  Print  
 
Jump to:  
   Forum Home   Thread Marks Chat! Downloads Search Login Register  

DonationCoder.com | About Us
DonationCoder.com Forum | Powered by SMF
[ Page time: 0.044s | Server load: 0.08 ]