Author Topic: Pinned Sites: Windows 7 Desktop Integration with Internet Explorer 9 - 2 of 10  (Read 1905 times)

Offline javajolt

  • Administrator
  • Hero Member
  • *****
  • Posts: 36139
  • Gender: Male
  • I Do Windows
    • windows10newsinfo.com
continued from part 1


Adding a Website to the Start Menu (All Programs Menu)

With Internet Explorer 9, users can add any website to the Windows Start menu by using menu commands (click the Tools menu and then click Add site to Start menu) or by dragging a tab onto the Start button. The website is then listed in the All Programs folder of the Start menu. In addition to user interaction, your website can promote this functionality programmatically by using the pinned site APIs. After adding a site through your website or the browser, users can then access the website through the Start menu, just as they access a native application running on Windows. As with those webpages pinned to the taskbar, webpages launched from the Start menu provide the fully branded experience once you provide markup to customize the start URL, icon, name, tooltip, and navigation button colors associated with the Start menu entry.

All of the mechanisms designed to add an entry into the Start menu generate a dialog box that asks users to confirm or cancel the operation, as the following screen shot shows.


Figure 6: The dialog box where users confirm whether to add an entry into the Start menu

Adding a website to the Start menu by using the pinned sites APIs

Use the window.external.msAddSiteMode() method to add a site to the Start menu. The API can be triggered from any HTML element by using JavaScript, as in the following code example:

<a onclick="window.external.msAddSiteMode();" href="#">Add Website</a><br />

You can identify if a website has been launched as a pinned site by calling the window.external.msIsSiteMode method. The msIsSiteMode method returns a Boolean value that returns true if the window was launched as a pinned site; otherwise, false.

Customizing a website launched from a pinned site

You use meta elements to customize the way the pinned site renders after it is launched from a pinned site location, by using the following syntax:

<meta name="name" content="content"/>

The values for name and content are described in the following table:



The following code example uses meta elements to customize the pinned site shortcut with a tooltip, start URL, initial window size, and navigation button color.

<meta name="application-name" content="Sample Site Mode Application"/>
<meta name="msapplication-tooltip" content="Start the page in Site Mode"/>
<meta name="msapplication-starturl" content="http://example.com/start.html"/>
<meta name="msapplication-window" content="width=800;height=600"/>
<meta name="msapplication-navbutton-color" content="red"/>


You can also specify the favicon to use by following existing webpage syntax:

<LINK rel="shortcut icon" type=image/x-icon href="http://host/favicon.ico">
<LINK rel=icon type=image/ico href="./favicon.ico">


Windows attempts to retrieve a 32x32 version of the favicon from the specified file. If that size cannot be found, Windows frames the 16x16 version of the favicon inside a 32x32 document image. If no favicon is specified, Windows uses a framed version of the Internet Explorer icon. The favicon icon can also be overwritten by the user through the property settings dialog box.


source:msdn.microsoft.com
continue to part 3
« Last Edit: October 26, 2010, 11:49:30 PM by javajolt »