Object that toggles Icons

Tuesday, November 21, 2006 by Jaramia | Discussion: DesktopX

I there a way you can Create an object that can change if you see or dont see the icons on your desktop with a click of a button??
BigDogBigFeet
Reply #1 Tuesday, November 21, 2006 9:24 PM
Okay, I'll try again(sorry I had a connection issue). There isn't anyway I know of to do this directly. This is because when you change the desktop icons visiblity it is done as a configuration setting and then DesktopX must reload itself. However, you can fake it. First, create a theme with your Desktop Icons visible. Second, create an object that has as its image your chosen wallpaper and make it a toggle style object. Third create a controller object to toggle it. You will have to of course toggle all your other visible desktop objects which can be done by giving them a common group name and then toggling the whole group at one time. Try it out for yourself. No scripting is required to do it this way.  
ZubaZ
Reply #2 Tuesday, November 21, 2006 10:15 PM
Here's a VBS script that could be an object (I think):

'desktopicons.vbs - Hide/Show Desktop Icons
'© Doug Knox - rev 12/03/99

Option Explicit
On Error Resume Next

'Declare variables
Dim WSHShell, n, MyBox, p, p1, p2, t, mustboot, errnum, vers
Dim itemtype
Dim enab, disab, jobfunc

Set WSHShell = WScript.CreateObject("WScript.Shell")
p = "HKCU\Software\Microsoft\Windows\CurrentVersion\Policies\Explorer\"
p1 = "NoDesktop"
p2 = p & p1
itemtype = "REG_DWORD"
mustboot = "Log off and back on, or restart your pc to"
mustboot = mustboot & vbCR & "effect the changes"
enab = "ENABLED"
disab = "DISABLED"
jobfunc = "Desktop Icons are now "

'This section tries to read the registry key value. If not present an
'error is generated. Normal error return should be 0 if value is
'present
t = "Confirmation"
Err.Clear
n = WSHShell.RegRead (p2)
errnum = Err.Number

if errnum <> 0 then
'Create the registry key value for NoDesktop with value 0
WSHShell.RegWrite p2, 0, itemtype
End If

'If the key is present, or was created, it is toggled
'Confirmations can be disabled by commenting out
'the two MyBox lines below

If n = 0 Then
n = 1
WSHShell.RegWrite p2, n, itemtype
Mybox = MsgBox(jobfunc & disab & vbCR & mustboot, 4096, t)
ElseIf n = 1 then
n = 0
WSHShell.RegWrite p2, n, itemtype
Mybox = MsgBox(jobfunc & enab & vbCR & mustboot, 4096, t)
End If




KiloKrash
Reply #3 Tuesday, November 21, 2006 10:27 PM
Here's a VBS script that could be an object (I think):


Are you stealing Roman's scripts again?

*Goes to inform Roman of the treachery in an attempt to set off a war that will inevitably bring the demise of both, allowing for the rise of Kilo*
ZubaZ
Reply #4 Tuesday, November 21, 2006 11:29 PM
'desktopicons.vbs - Hide/Show Desktop Icons
'© Doug Knox - rev 12/03/99


  
KiloKrash
Reply #5 Tuesday, November 21, 2006 11:33 PM
I'm an idiot!
BigDogBigFeet
Reply #6 Tuesday, November 21, 2006 11:39 PM
Why do I like the no script method? lol
Jaramia
Reply #7 Wednesday, November 22, 2006 3:38 PM
k thanks

Please login to comment and/or vote for this skin.

Welcome Guest! Please take the time to register with us.
There are many great features available to you once you register, including:

  • Richer content, access to many features that are disabled for guests like commenting on the forums and downloading skins.
  • Access to a great community, with a massive database of many, many areas of interest.
  • Access to contests & subscription offers like exclusive emails.
  • It's simple, and FREE!



web-wc01