Sign in to follow this  
Followers 0
FastJMAN1

How to Hide and show an Icon from desktop on Windows7

4 posts in this topic

#1 ·  Posted (edited)

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

Share this post


Link to post
Share on other sites



#2 ·  Posted (edited)

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

Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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?

Share this post


Link to post
Share on other sites

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:


Visit the SciTE4AutoIt3 Download page for the latest versions        Beta files                                                          Forum Rules
 
Live for the present,
Dream of the future,
Learn from the past.
  :)

Share this post


Link to post
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
Sign in to follow this  
Followers 0