December 29, 2006

Visual Studio Build Events for MCML Applications

Filed under: Uncategorized — Anthony Park @ 2:41 pm

While working on MCEMailbox, I wanted a way to easily register my Media Center Markup Language (MCML) application with Media Center whenever I made a change. The default project template already includes a post-build step to run the MCMLVerifier. So, I modified the pre and post-build step to include the following extra tasks:

  • Unregisters the previous add-in with Media Center
  • Registers the new assembly in the Global Assembly Cache (GAC)
  • Registers the new add-in with Media Center

    To apply these post-build steps to your project:

    1. Right-click on the project in the Solution Explorer and select Properties
    2. Switch to the “Build Events” tab in the Properties window
    3. Set the Pre-build event command line to the following:

    %windir%\eHome\RegisterMCEApp.exe /u $(ProjectDir)App.xml
    if errorlevel != 0 exit 0


    4. Add the following text to the end of the Post-build event command line text box (make sure to leave the line that runs MCMLVerifier.exe):

    if errorlevel != 0 exit errorlevel
    "C:\Program Files\Microsoft Visual Studio 8\SDK\v2.0\Bin\gacutil.exe" /nologo /i "$(TargetPath)" /f
    if errorlevel != 0 exit errorlevel
    %windir%\eHome\RegisterMCEApp.exe $(ProjectDir)App.xml


    5. Build your project and smile. Hopefully, this will make debugging/retesting things a little bit easier.

    Note: This will only work if you are running Visual Studio 2005 as an Administrator. The step which runs gacutil to install the library in the GAC will fail if you are not an Administrator.
  • December 28, 2006

    MCEBrowser: Xbox 360 Controller Support

    Filed under: Uncategorized — Anthony Park @ 9:50 pm

    For some reason, I have received several questions recently about MCEBrowser’s support for the Xbox 360 controller. Since these questions seem to be increasing in frequency, I decided to address the question here on my blog.

    MCEBrowser was originally designed for use with the Media Center remote control on the Media Center PC. When I added Media Center Extender support, I tested on several Media Extender devices, including the Linksys Extender and the Xbox 360 extender. The testing included the Xbox 360 Universal Media Remote and the Xbox 360 Wireless Controller.

    While MCEBrowser fully works with the Xbox 360 controller, the buttons are a little different than if you are using the remote control. Here is the operation:

    In Media Center, the “A” button on the controller acts as the “enter” key, and the “B” button acts as the “back” button. This is pretty standard for most Xbox 360 games and applications, and also works for MCEBrowser.

    To move between buttons within MCEBrowser (and in Media Center in general), you can use either of the two left joysticks.

    In order to scroll around within a web page, select links, and use web-based form support, you need to put MCEBrowser in a mode that I call “browser lock mode”. In browser lock mode, some of the controls perform different functions. To enter browser lock mode, highlight the browser control in MCEBrowser and press the “A” button. The orange border around the browser will change to red, indicating that browser lock mode is active.

    Once in browser lock mode, the following Xbox 360 controls will perform functions within the browser:

  • Left Joystick (Up/Down) - Move between links and controls on a web page.
  • Left Joystick (Right/Left) - Scroll the web page to the right or left.
  • Right Joystick (Up/Down) - Scroll the web page up or down.
  • “A” Button - This acts like the “enter” key, selecting the currently active link and navigating the browser to it, or selecting the currently active web form control and allowing input to it.
  • “B” Button - Deactivate browser lock mode.
  • “X” Button - Simulates a right-click. This pops up a context menu with some additional options.
  • “Y” Button - As usual, this pops up the on-screen keyboard.

    There is one issue with using the Xbox 360 controller, which is a little quirky. If you need to type text into a web form control, there are two ways of doing this. The first way is to highlight the control and press “A” (enter). MCEBrowser will open a triple-tap entry control that will allow you to enter text. This triple-tap control is not compatible with the Xbox 360 on-screen keyboard. If you have a remote control, you an use the triple-tap entry screen with the remote control. If you have only an Xbox 360 controller, do not use the triple-tap control. Instead, highlight the control in MCEBrowser and press the “Y” button to bring up the on-screen keyboard. This will allow you to type the text directly into the web form control. This is a somewhat annoying issue, but isn’t too bad once you get used to it. I plan to fix this in a future version of MCEBrowser.

    Hope this clears up any confusion about MCEBrowser usage with the Xbox 360 controller. Thanks for asking!
  • December 26, 2006

    Working on a New MCML Application: MCEMailbox

    Filed under: Uncategorized — Anthony Park @ 6:07 pm

    I’m working on a new Media Center application called MCEMailbox. MCEMailbox allows users to be notified of new emails, and view their inbox within the Media Center environment on Windows Vista.

    It looks like OABSoftware beat me to the punch with their Vista Media Center Mail application, but I’ve been working on this application for a while now as a motivation to learn the new Media Center Markup Language (MCML). I plan on releasing a beta version in about a month or so, and I’ll be blogging about my progress here.

    So far, I have really enjoyed working with MCML. I think it is a great addition to the current Media Center extensibility models, and look forward to the adoption of Windows Vista so that this platform has a larger potential user base. I have found some of the features of MCML to be downright awesome, and I have come across some limitations that I am still working through.

    For now, I thought I’d share some screen shots of my progress so far.

    MCEMailbox checks on a time interval for new messages in a POP3 account. When a new message arrives, the user is notified and given the option to view their inbox:




    MCEMailbox can also be accessed from within the “Program Library”:




    Opening MCEMailbox will show the user the contents of their inbox, with options to sort by Date, Subject, or Sender:




    Selecting a message in the Inbox will take you to the “View Message” screen, where you can see the details of the message:




    There is also a 10-foot configuration screen where you can configure the mail server settings:




    And finally, an About screen:




    That’s all for now. I still have a few hard issues to solve, which I’ll be working on in the next few weeks. In addition to releasing a beta version in the next month or so, I also plan to open-source this Media Center add-in. It will probably be hosted on CodePlex once the code is somewhat stable.

    December 4, 2006

    Media Center Show Awards 2006 - Vote Now!

    Filed under: Uncategorized — Anthony Park @ 7:34 pm

    Ian Dixon over at the
    Media Center Show
    has just opened up the Voting for the Media Center Show Awards 2006






    MCEBrowser has been nominated in the “Best Free (non-commercial) application” category. Take a minute and vote!