Jump to content

How to Hide and show an Icon from desktop on Windows7


Recommended Posts

I have created a floating toolbar kind of like stardock stuff that I plan on releasing in the future but I want to hide icons on desktop that have been picked for use on the toolbar and then show the icons again when the toolbar is closed. My script works perfect on XP but does not work on Windows7. It would be nice if I could make it work for both.

Got any ideas?

I hide the icon with this

Global $1Icon = FileReadLine($vfile, 2)

FileSetAttrib($1Icon, "+H", 1)

RefreshDesktop()

I show the icon with this

Global $1Icon = FileReadLine($vfile, 2)

FileSetAttrib($1Icon, "-H", 1)

RefreshDesktop()

Func RefreshDesktop()

ControlSend('Program Manager', '', '', '{F5}')

EndFunc

This works perfect on XP Pro and does not work on Windows7

I have Windows 7 Ultimate 32bit / x86

Any help would be greatly appreciated

Edited by FastJMAN1
Link to comment
Share on other sites

  • Developers

Please post in the correct forum (moved from examples)

Also not sure why you created a new topic when you are already discussing this topic in another thread.

Jos

Edited by Jos

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Please post in the correct forum (moved from examples)

Also not sure why you created a new topic when you are already discussing this topic in another thread.

Jos

Sorry about that, I was not sure if examples or not. I had a example in my post. Is the example part of the forum just for full and completed scripts?
Link to comment
Share on other sites

  • Developers

I would think the forum description is clear enough:

Example Scripts

A forum to share your cool scripts, User Defined Functions and AutoIt-based applications with others.

This is NOT a general support forum!

Jos :graduated:

SciTE4AutoIt3 Full installer Download page   - Beta files       Read before posting     How to post scriptsource   Forum etiquette  Forum Rules 
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...