Contents
Articles
Behaviors
Books
Director News
Director Web Sites
FAQ
Games
Mailing Lists
News Groups
Project Examples
Reviews
Software
Tools
Useful Web Sites
Utilities
Xtras

Don't miss these
Text Encryption
Director and online database interaction
Director-3D.com
System Tools
e-mail tech support
simBrowser1.0
Force Characters
Snow-Alphamania
MMX
Final text box resizer for text members
 

 

 

Behavior Generic behavior to change System Desktop Icons

Added on 1/21/2002

 

Compatibilities:
behavior D6_5 D7 D8 D8_5 PC UK US

Required Xtras:
Desktop Xtra

This item has not yet been rated

Author: Shockdev

Allows to customize System Desktop Icons

-- Generic behavior to change System Desktop Icons
-- Desktop Xtra 1.0 or later required
-- Compatibilities: Director 6.x, 7.x, 8.x, Windows

property Icons, OldIcons
property MyComputer, NetworkNeighborhood, RecycleBinFull, RecycleBinEmpty, Inbox, Internet, MyDocuments

on getPropertyDescriptionList
  set description = [:]
  set path = the moviePath
  addProp description, #MyComputer, [#default: path & "MyComputer.ico", #format:#string, #comment:"My Computer Icon:"]
  addProp description, #NetworkNeighborhood, [#default: path & "NetworkNeighborhood.ico", #format:#string, #comment:"Network Neighborhood Icon:"]
  addProp description, #RecycleBinFull, [#default: path & "RecycleBinFull.ico", #format:#string, #comment:"Recycle Bin Full Icon:"]
  addProp description, #RecycleBinEmpty, [#default: path & "RecycleBinEmpty.ico", #format:#string, #comment:"Recycle Bin Empty Icon:"]
  addProp description, #Inbox, [#default: path & "Inbox.ico", #format:#string, #comment:"Inbox Icon:"]
  addProp description, #Internet, [#default: path & "Internet.ico", #format:#string, #comment:"Internet Icon:"]
  addProp description, #MyDocuments, [#default: path & "MyDocuments.ico", #format:#string, #comment:"My Documents Icon:"]
  return description
end

on getBehaviorDescription
  return "            " & ¬
  "- -  System Desktop Icons Behavior  - -" & RETURN & ¬
  "Changes all system desktop icons:"& RETURN & ¬
  "MyComputer, NetworkNeighborhood, RecycleBinFull, RecycleBinEmpty, Inbox, Internet, MyDocuments."
end

on mouseDown
  -- List of all system desktop icons
  set Icons = []
  add Icons, "MyComputer"
  add Icons, "NetworkNeighborhood"
  add Icons, "RecycleBinFull"
  add Icons, "RecycleBinEmpty"
  add Icons, "Inbox"
  add Icons, "Internet"
  add Icons, "MyDocuments"
  changeIcons
end

on changeIcons
  set icon = ""
  set OldIcons = [:]
  repeat with i = 1 to count(Icons)
    do "set icon="&getAt(Icons,i)
    set Ok = changeDesktopIcon (getAt(Icons,i), icon)
    if getAt(Ok,1) = 0 then
      -- Ok, we save all previous icons as the OldIcons property list
      addProp OldIcons, getAt(Icons,i), getAt(Ok,3)
    else
      -- Error
      alert("Error: " & getAt(Ok,1) & " - base error code")
    end if
  end repeat
  -- Now apply the changes
  set Result = ApplyDesktopIconChanges()
  if getAt(Result,1) <> 0 then
    alert("Error: " & getAt(Result,1) & " - base error code")
  end if
end

 


Contact

MMI
36 South Court Sq
Suite 300
Newnan, GA 30263
USA

Send e-mail