locked
How to reliably hide "Start" button on Win7?

    Question

  • I've been using ShowWindow(FindWindow(L"Shell_TrayWnd", NULL), SW_HIDE) to hide taskbar on XP with no problems.  I tried the same technique on Win7 but it is not reliable.  Occasionally the "Start" button will popup in the left bottom corner while the rest of the taskbar remains hidden.  I don't know yet what causes it to popup but I wonder if there is a more reliable way to hide the taskbar, including the "Start" button.

    I've been through many postings on the net but did not find any solution.  There has to be a way to do it.  There is a lot of full-screen apps out there that must be utilizing good and reliable techniques (e.g. full-screen slide shows, games, interactive kiosk apps, digital signage, etc.).

    I'd appreciate _any_ suggestions.

    Thanks. 

    Monday, May 10, 2010 5:10 PM

Answers

  • "Start" is an ordinary button that has been subclassed.

    You can see this using Spy++.

    I just did.

    It will make a selection but when you move the drop target over the Start button you can see its properties.

     

    When you have a top most window and then a second window becomes top most, it will appear over the first window.

    So probably the taskbar is being made top most periodically or when some sort or event or message happens.


    «_Superman_»
    Microsoft MVP (Visual C++)
    • Marked as answer by Bogdan859 Tuesday, May 11, 2010 12:43 PM
    Monday, May 10, 2010 9:46 PM

All replies

  • For this you do not need to hide the taskbar.

    Make you're window the top most using SetWindowPos and place it over the taskbar.

     


    «_Superman_»
    Microsoft MVP (Visual C++)
    Monday, May 10, 2010 6:12 PM
  • I do use SetWindowPos when the application starts.  The problem is that while the application is running (it could be hours, days, weeks, etc.) occasionally the "Start" button pops up - not the whole taskbar.

    I can't determine the button's window name using spy++.  I can only see the taskbar (i.e. "Shell_TrayWnd").  I expected the "Start" button to be a child of the taskbar but it is obviously not the case on Win7.

    XP has "Keep the taskbar on top of other windows" option -  which I always recommend to turn off - and maybe this is why I have never received any complaints from end users running my app on XP.

    Any other suggestions?

    Thanks.

    P.S. Please ignore this post if you received any of my previous responses to your reply.  I posted a response few hours ago but it did not appear on the forum.  I might've messed up something. 

    Monday, May 10, 2010 9:38 PM
  • "Start" is an ordinary button that has been subclassed.

    You can see this using Spy++.

    I just did.

    It will make a selection but when you move the drop target over the Start button you can see its properties.

     

    When you have a top most window and then a second window becomes top most, it will appear over the first window.

    So probably the taskbar is being made top most periodically or when some sort or event or message happens.


    «_Superman_»
    Microsoft MVP (Visual C++)
    • Marked as answer by Bogdan859 Tuesday, May 11, 2010 12:43 PM
    Monday, May 10, 2010 9:46 PM