Share via


Windows XP Media Center Edition SDK Using Frames 

banner art
Previous Next

Using Frames

You are free to use frames in your application. Keeping one frame static while the other navigates can be useful for maintaining the state of a global variable or keeping an ActiveX control running while the user moves from page to page in your site. Be aware that each time the user navigates from page to page inside a frame, the previous page is added to the history list, which is accessible by using the BACK button. Because Media Center users rely on their remote control BACK button as an important navigational tool, be sure to test the back navigation in your frames to be certain that the functionality you provide meets user expectations. If adding frame pages to the history list becomes a problem, you can use the following method to navigate within a frame without adding the previous page to the history list:

  

Media Center passes input from the remote control only to the top-level page in a frameset. It is up to the developer to pass this information along to the lower-level pages inside the frames, enabling the user to interact with them using the remote control. The following HTML code illustrates how to do this:

  

Because Media Center calls the onRemoteEvent function when the user presses certain remote control keys, you can simply write this function to call another one of the same name on one or both of your lower-level pages. This can become rather complicated if you want to have focusable items in both frames, because then you will have to write code in the top-level page to keep track of which frame has the focus.

See Also

Previous Next

© 2005 Microsoft Corporation. All rights reserved.