Thursday, March 29, 2007

MCE tip #1: TBP (ToolBar Persisted)

I have recently had to investigate whether it is possible to remove mouse-over toolbar from MCE (Media Center Edition application). That toolbar seems to have similar (actually, the same) implementation both on MCE 2005 and Vista MCE.

On Vista MCE (not sure about MCE 2005 - didn't have time to check it out there) there is a nice item under Tasks menu - "Media only" - which purpose is basically to make the app to run full screen and hide the mouse toolbar at the right top corner of the application window. This option however doesn't persist. If you restart the application or simply reboot, the mouse toolbar comes back (it only appears when you move mouse cursor while the app is running, of course).

I got around this by doing the following two things:
- making my monitoring agent application (see the other post "Vista tip #1") to watch on the MCE windows (certainly had to hack around a little bit first to get to know all the necessary window class names and etc.). If something wrong happens to the full screen MCE app window, I set it back - always on top, full screen, foreground, etc.
- completely removing the mouse support from the image. Not PS2 nor an USB mouse would work there, hence no way for end user to mess with the mouse-over toolbar of the MCE app.
(I needed the second also to get rid of the mouse cursor there).

Anyway, this tip is not about how to remove the toolbar. It is rather opposite - how to make it persistent so that all the MCE controls including the mouse-over toolbar are always there. (in PC mode users may like it)
For MCE unattended setup there is an option (TBP) in XML file that allows you to specify whether mouse toolbars always appear in the Windows Media Center UI: http://technet2.microsoft.com/WindowsVista/en/library/524ca8fc-af68-4e5a-9d68-3cc678a270091033.mspx
Now, where is the registry key is located? Here it is: [HKCU\Software\Microsoft\Windows\CurrentVersion\MediaCenter\Capabilities],"TBP"=dword:1.

No comments: