change taskbar properties from an app or regedit import?

Discussion in 'Windows Vista General Discussion' started by Jeff, Feb 12, 2009.

  1. Jeff

    Jeff Guest

    If you right-click on the taskbar, you can get to the Taskbar and Start Menu
    Properties dialog and change various settings.

    Is there some way to change these settings from a C++ (preferably) or VB
    program?

    Alternatively, is there a way to change these settings with a registry
    import? I've looked through the registry and haven't found where they are
    stored.

    Thanks,
    Jeff
     
    Jeff, Feb 12, 2009
    #1
    1. Advertisements

  2. Jeff

    Jeff Guest

    When the Taskbar and Start Menu Properties dialog comes up, it has things
    like "Lock the taskbar", "Auto-hide the taskbar", etc. I haven't been able
    to find those settings anywhere in the registry, including in the subtree
    you suggested.
     
    Jeff, Feb 12, 2009
    #2
    1. Advertisements

  3. The setting for Lock the taskbar is in the key

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\Advanced

    Setting TaskbarSizeMove to DWORD 0 will lock the Taskbar and a value of
    1 will unlock it.

    Auto-hide the taskbar is a lot more complicated. Although the setting
    is in

    HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Explorer\StuckRects2

    in a setting called Settings, the value is a REG_Binary type that is
    bitmapped for a number of settings so you have to figure out which bit
    controlls the setting. Even worse, the setting is only written to the
    registry during a logoff making it more difficult to figure out which
    bit is the right one. A bigger problem is that Explorer only reads the
    "stuckrects2" registry entry when it starts and it overwrites the entry
    again when it exits, so you have to figure out how to change it before
    Explorer starts (so between machine start and user logon).

    I ended up not doing anything with it because of that problem, but if
    you do want to proceed, here's what I found out. Maybe it will save you
    some work. There may be (probably is?) a way to change this
    programatically without tweaking the registry directly, but I don't know
    how to. You might check in a programming group for your preferred
    compiler/language if you want to go that route.

    The value looks like this for me:

    "Settings"=hex:28,00,00,00,ff,ff,ff,ff,02,00,00,00,03,00,00,00,6b,00,00,00,3c,\
    00,00,00,00,00,00,00,c4,03,00,00,00,05,00,00,00,04,00,00

    Look at the 9th hexadecimal number pair (in my case 02). Using the
    chart below, you can figure out what the setting currently is (in my
    case, Always on Top and Show Clock), and what to set it to for your
    particular needs. I found this chart on the web, so I can't guarantee
    the accuracy :)

    SINGLE OPTIONS:
    ---------------
    08 = No Settings Enabled
    09 = Auto Hide
    00 = Show Clock
    0A = Always on Top
    0C = Show small icons in Start Menu

    MULTIPLE OPTIONS:
    -----------------
    01 = Auto Hide and Show Clock
    02 = Always on Top and Show Clock
    03 = Always on Top and Auto Hide and Show Clock
    04 = Show small icons in Start Menu and Show Clock
    0E = Always on Top and Show small icons in Start Menu
    0F = Always on Top and Auto Hide and Show small icons in Start Menu
    06 = Always on Top and Show small icons in Start Menu and Show Clock
    07 = All Options Enabled
    0B = Always on Top and Auto Hide
    0D = Auto Hide and Show small icons in Start Menu

    Hope this helps.
     
    Zaphod Beeblebrox, Feb 13, 2009
    #3
  4. Jeff

    Jeff Guest

    Thanks a bunch, Zaphod!!! That is really helpful.
     
    Jeff, Feb 13, 2009
    #4
  5. Jeff

    Jeff Guest

    And as a result, I have decided to use SendMessage to effect these changes:
    WM_RBUTTONxxx to the taskbar, mouse or menu messages to the menu, BM_CLICK
    and WM_KEYDOWN to the properties dialog.
     
    Jeff, Feb 15, 2009
    #5
  6. Jeff

    frjufrjufrju Guest

    mouse or menu messages to the [taskbar pop-up] menu
    As it turned out, I couldn't get either of these messages to work.
    Instead, I used WM_KEYDOWN to send VK_DOWN and VK_RETURN to this pop-
    up window. In any case, I was able to change the taskbar settings.
     
    frjufrjufrju, Feb 20, 2009
    #6
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.