Chapter 14 - Active Desktop

In This Chapter

Understanding the Active Desktop

Historical Background of the Active Desktop Layers of the Active Desktop The Active Desktop and Webcasting

Customizing the Active Desktop

Customizing Active Desktop Wallpaper HTML Wallpaper Samples Adding Channel Screen Savers Configuring Active Desktop Items

Developing Active Desktop Items

Designing Active Desktop Items Creating CDF Files for Active Desktop Items CDF Example for an Active Desktop Item Offering the Active Desktop Item to Users

Understanding the Active Desktop

The Internet Explorer 4 Active Desktop interface is capable of hosting any Hypertext Markup Language (HTML) item, such as Web pages, Java applets, ActiveX controls, floating frames, and images. With this technology, users can create a highly customized environment that automatically brings their favorite Web content to their desktop. Web publishers can leverage their existing tools and production processes to enhance their Web content with Dynamic HTML support. The resulting desktop and Web integration benefits users through a richer and easier Web experience. Web publishers also benefit from the increased presence in the users' working environment.

Active Desktop technology for Internet Explorer 4 marries the best of the Internet to the Windows shell. It creates a unique opportunity to push and pull content and applications from internal and external Web sites, providing a powerful, customizable, information delivery architecture. Essentially, the Active Desktop allows users to place Web sites directly on their desktops, in the form of either Active Desktop items, wallpaper, or screen savers. You can also add an item from the Microsoft Active Desktop gallery, such as a Java clock or a stock ticker.

Historical Background of the Active Desktop

The seeds for integrating the Windows shell and browser were planted with the release of Internet Explorer 3, which componentized the Web browser as an ActiveX control so it could be embedded in a Visual Basic form or an HTML page. But to completely integrate the browser component with the container's frame, the browser piece would have to be extended further; it would need to become an Active Document server. (For more information, see the Internet Client Software Development Kit.) Active Documents make it possible to view non-HTML content without leaving the browser, and an Active Document server is simply an OLE Document server with additional interfaces that enable embeddable in-place objects to take over the entire document window. Active Documents thus unified the browsing model for applications, documents, and objects.

The brainstorm that drove design of the Active Desktop was to turn the Windows desktop into an ActiveX Document container. The Active Desktop doesn't include all of the browser's user interface elements, but as you will see, you can do quite a bit with an HTML view of the world.

Layers of the Active Desktop

The Active Desktop in Internet Explorer 4 is built from two separate layers. The desktop icon layer exposes all the user's existing desktop shortcuts, and the background HTML layer hosts the HTML wallpaper or screen saver and all Active Desktop items. The HTML layer is described by a single, local HTML file called Desktop.htm, which is created and edited automatically by Internet Explorer 4. This file contains the following:

  • HTML tags that represent each Active Desktop item. Each Active Desktop item consists of a single HTML tag with arbitrary x- and y-positions. The HTML tag used for an Active Desktop item can be either an image (IMG tag) or a floating frame (IFRAME tag) and is generated automatically by Internet Explorer 4. The floating frame is the most commonly used approach, because it neatly encapsulates an entire arbitrary HTML document that can contain anything the publisher desires. In either case, a single URL points to the actual content. 

  • An ActiveX control that enables moving and resizing of the Active Desktop items and also helps manage the list of items. 

  • Any other static HTML that the user wants to have in the background. By default, this is just a reference to the user's chosen wallpaper, which is exposed as the background watermark for the HTML page. 

Active Desktop items provide dynamic links from the desktop to Web content. An Active Desktop item can be an ActiveX control, a Java applet, an image, or an HTML document. Because these are all essentially things that you can put in an HTML document, they are no different from the HTML wallpaper, except that they live in a layer above it. You can see this by dragging a desktop item around your Active Desktop; it will always be drawn underneath the icons and on top of the wallpaper. Active Desktop items are hosted in an instance of the WebBrowser control. An Active Desktop item can act as a desktop shortcut or a quickly referenced source of regularly updated information. When combined with Web site subscriptions (explained in detail in Chapter 15, "Basic Webcasting.") you can present timely information to your users without requiring any effort on their part.

The Active Desktop is the part of the Windows shell that keeps track of Active Desktop objects. The persistent information about installed desktop items is located in the registry at

HKEY_CURRENT_USER \Software \Microsoft \InternetExplorer \Desktop 

The desktop icon layer extends all the features of standard Web-page hyperlinks, such as single-click navigation and hot tracking, to your desktop icons. Plus, it extends this Web-like feel to the familiar features in the Windows 95 shell, such as click-through transparency, dragging, file-type associations, double-clicking, and more.

Dd423379.3_13(en-us,TechNet.10).gif 

The Active Desktop and Webcasting

You can easily place any ActiveX control, Java applet, graphic, or HTML document on your desktop and leave it at that. To get the most from the Active Desktop, however, you'll want to utilize the Webcasting technologies that are available in Internet Explorer 4. Part 4, "Information Delivery: Webcasting," provides a complete explanation of these features, but a few ideas are important to understand now.

Active Desktop items and Active Desktop wallpaper are, essentially, Web sites that appear directly, in borderless frames, on users' desktops. Once a Web site is placed on the Active Desktop, the site's content is cached on the computer's hard disk, so it's always available for offline viewing. The user can then choose to "subscribe" to the Web site, and the Active Desktop item or wallpaper will be automatically updated at regularly scheduled times, so the content will always be up-to-date.

For optimum control of the update schedule and the type of content that is downloaded during these updates, Channel Definition Format (CDF) files can be used to create Active Channels. Again, Part 4 offers a complete explanation of Active Channels and CDF files. For our purposes now, it is only necessary to understand that CDF files can be used to create custom Active Desktop items and wallpaper and also to bring channel screen savers to the Active Desktop.

It's important to note that Webcasting is typically used to deliver Web content that appears in a subscriber's browser window, while Active Desktop items are used to deliver miniature Web pages that appear directly on subscribers' desktops. Desktop items live on the Windows desktop, alongside existing desktop shortcuts. A desktop item lets you create dynamic links to a workgroup's favorite Web content. Desktop items are typically designed to provide summary information in a small amount of screen space. Therefore, information in desktop items often includes hyperlinks or hot spots, so users can click a designated area to open a browser window and obtain the details they want.

You can configure individual update schedules for each Active Desktop item. For example, a user's Active Desktop can display three different desktop items: an inventory ticker that is updated every 15 minutes, a workgroup home page that is updated once a day, and a newsletter that is updated once a week. Internet Explorer 4 automatically refreshes the desktop item whenever the update occurs.

Dd423379.3_14(en-us,TechNet.10).gif 

Customizing the Active Desktop

One of the best benefits of the Active Desktop for administrators is the ability to add custom HTML wallpaper, screen savers, and Active Desktop items for workgroups. This provides a way to display relevant, up-to-date information directly on users' desktops. HTML wallpaper and screen savers can be targeted to specific user groups, and Active Desktop items can be used to complement the information presented there.

For example, a company with many different departments can create a custom HTML page specific to each department. This page might include links to files, folders, and URLs of interest to the specific department, as well as company-wide resources such as organizational charts, a human resources intranet site, and the company's official Internet site. Active Desktop items could be created to alert employees of company news and events and provide a top-level summary of news feeds and trade-related information. A special Active Desktop item could be targeted to new employees that would make it easier to set up their computers and access company resources. Using Webcasting, the new user information could be automatically replaced after a specified period of time. A smaller organization might simplify this approach, by having one page for all employees.

To import a custom Active Desktop to user groups, first configure the Active Desktop on the computer with the Internet Explorer Administration Kit (IEAK), and the wallpaper, screen savers, and desktop items will be carried over to users when the IEAK Configuration Wizard is run. User access to Active Desktop settings can be restricted to prevent users from changing the configurations on their machines.

For information about troubleshooting the Active Desktop, see Appendix D.

Customizing Active Desktop Wallpaper

You can display any HTML page as the wallpaper on the Active Desktop. Remember that the page you select on your configuration machine will be the page seen by all users in the workgroup.

To use an HTML page as the default Active Desktop wallpaper
  1. Create the HTML page you want to use as wallpaper. 

  2. Right-click the Active Desktop to display the shortcut menu, and then click Properties

  3. Click the Web tab, and then select the View My Active Desktop as a Web Page check box. 

  4. Click the Background tab, and navigate to the location of the HTML file you created in step 1. 

  5. Select the file, and click OK to display the file. 

Tip Try incorporating Dynamic HTML into your Web page to provide a more engaging experience for your users. For more information about Dynamic HTML, see: https://msdn.microsoft.com/library/default.asp?url=/workshop/author/dhtml/dhtml.asp  .

HTML Wallpaper Samples

These samples show how a company can create specialized HTML wallpaper to help meet the information needs of different workgroups. All samples can be run directly from the Internet Explorer 4 Resource Kit Compact Disc. Click Start, then click Run, and enter D:\Samples (substituting the letter of your CD-ROM drive if it is different than D).

The HTML wallpaper samples are located in D:\Samples\desktops. You can view these samples in the browser window by double-clicking the HTML file in the Desktops directory; or, to view the samples directly on the desktop, copy D:\Samples \desktops to your hard disk, and select the various HTML files as your wallpaper.

Here are two sample desktops that illustrate how custom wallpaper can be used effectively:

  • Corpdesk.htm contains a floating frame that displays the current date and a short bulletin page. It also features an intranet search window (disabled for this demo). 

  • Corpdesk1.htm features a floating frame that displays current inventory data and a bar graph that displays various sales statistics. Although the information in this demo is read from a delimited text file, it can be easily adapted to interact with a database. 

Adding Channel Screen Savers

You can configure the Active Desktop to use a screen saver provided by a subscribed Active Channel Web site, even if that usage is not specified in the Active Channel's CDF file. With a channel screen saver, a user can move the mouse and click objects on the screen without immediately dismissing the screen saver. Clicking a link on the screen saver opens a browser window and dismisses the screen saver.

In a corporate intranet, you might want to configure a channel screen saver that displays a stock ticker, broadcast bulletins, or an inventory counter. For more information about channel screen savers, see Chapter 16. Remember that the page you select on your configuration machine will be the page seen by all users in the workgroup.

To configure a channel screen saver
  1. Right-click the Active Desktop to display the shortcut menu, and then click Properties

  2. Click the Screen Savers tab, and then, in the Screen Savers dialog box, click Channel Screen Saver

Configuring Active Desktop Items

You can add any graphic, URL, or HTML file to your desktop as an Active Desktop item. Adding a URL will automatically subscribe you to the site you selected. When you subscribe to a URL, site information is automatically cached on your computer for offline viewing, and Internet Explorer 4 will automatically update the desktop item on a schedule you choose. (For more information about Web subscriptions, see Part 4.)

To add an Active Desktop item
  1. Right-click the Active Desktop to display the shortcut menu, and then click Properties

  2. Click the Web tab; then click New

    Dd423379.3_15(en-us,TechNet.10).gif
    If your browser does not support inline frames, click here to view on a separate page. 

  3. Enter the URL or path to the item, or click Browse to navigate to the file's location on your local or network drive. 

  4. Click OK to add the item to your desktop. 

    Alternatively, you can add a desktop item by subscribing to an Active Channel that specifies a desktop component. For more information, see Chapter 16, "Managed Webcasting." 

Note To download examples of Active Desktop items, visit the Active Desktop gallery at: https://www.microsoft.com/windows/ie/default.asp  .

To disable or delete an Active Desktop item
  1. Right-click the Active Desktop to display the shortcut menu, and then click Properties

    Click the Web tab.

    • To disable an item, clear the check box next to the item. It will still be there if you want to use it again. 

    • To delete an item, select the item, and click Delete. This will permanently remove the item from your system. 

  2. Click OK

System administrators can place Active Desktop items on users' desktops during configuration by setting them up on the configuration machine prior to running the IEAK Configuration Wizard. Users can be restricted from modifying, adding, and removing Active Desktop items by using the IEAK Configuration Wizard or the IEAK Profile Manager.

To lock down Active Desktop items

In the IEAK Configuration Wizard or the IEAK Profile Manager, on the System Policies and Restrictions page, under Web Desktop, select the following options:

  • Disable all desktop items 

  • Disable adding any new desktop items 

  • Disable deleting any desktop items 

  • Disable editing any desktop items 

  • Disable closing any desktop items 

Developing Active Desktop Items

The process for developing a custom Active Desktop item is essentially the same as the process for developing an Active Channel. First, you design the desktop item (the Web page), and then you create its CDF file. In Chapter 16, the "Creating CDF Files" section offers a detailed explanation, with examples, of how to build CDF files, plus some special instructions for creating CDF files for Active Desktop items. Some additional information, specific to desktop items, is detailed below.

Designing Active Desktop Items

When first designing the Active Desktop item, there are some special guidelines to keep in mind. Again, Chapter 16 offers general guidelines for designing Web sites to be used as Active Channels, but if you want the channel to function with optimum effectiveness as a desktop item, also consider these guidelines and tips:

  • Try implementing Dynamic HTML in your Active Desktop item. It is common for an Active Desktop item to cycle through a set of headlines or summary information. Dynamic HTML makes it possible to achieve this effect without using Java or ActiveX code. 

  • The item must work offline. Since most dial-up users don't have a constant connection to the Internet, an Active Desktop item should display some reasonable content in the absence of a connection. This is important, because the desktop is immediately visible when the user launches the operating system, even before the user has a chance to initiate a dial-up session. An Active Desktop item that displays a blank, gray square or an error message while the user is offline is neither useful or attractive. 

    To avoid problems, any necessary data files the item requires should be configured to be cached on the user's computer. The Internet Explorer 4 subscription feature can be configured to cache any object referenced by an Active Desktop item by including it in the CDF file with the ITEM element. Subscriptions can be set to automatically download any images, sounds, objects, or applets, and also any number of HTML links n levels deep. It is important to note that Java applets cannot be pre-cached if the Java classes are not wrapped together in a .cab, .zip, or .jar file. If the classes are in separate files, Internet Explorer cannot determine the Java class dependencies and cache appropriately, because Java binds classes dynamically. 

    Java- and ActiveX-based desktop items should also be authored to give an error or informational message when not connected to the network, to prevent an empty, gray box from being displayed. Also, to read from the cache when not connected to the network, Java applets should call setUseCaches(TRUE) in their java.net objects. Active Desktop items can also specify individual subscriptions for any data files or objects they may reference. Please note that Java applets and ActiveX controls must be signed so they can access content from the offline cache. For more information about signing Java applets or ActiveX controls, see https://www.microsoft.com/mscorp/java/  or https://www.microsoft.com/net/  . 

  • Avoid using in-place navigation controls. Active Desktop items are meant to be lightweight and therefore have no navigation controls available for the user to move backward and forward. By default, clicking a link inside an Active Desktop item creates a new browser window. The intended purpose of an Active Desktop item is to provide quick summary information and an easy browser-launching mechanism if the user wants more information. Therefore, authors shouldn't create in-place navigation controls, and they shouldn't depend on the Back and Forward commands being available to the item. Active Desktop item authors should not make any assumptions about the context in which the item is running. 

  • Smaller is better. An Active Desktop item needs to share the desktop space with any other icons or Active Desktop items the user has selected. Because this space is completely customizable by the user, Active Desktop items should be authored to be as small as possible to display their desired content. This gives Active Desktop users the maximum flexibility to arrange their desktop as they wish. A good benchmark is to make sure that the Active Desktop item takes up no more than one-sixth the area of the screen. By default, Internet Explorer lays out new Active Desktop items on a 3 by 2 grid. As more items are added to the desktop, they will start to overlap each other. For a desktop at a resolution of 640 x 480, allowing for reasonable spacing between items, this would translate into a maximum size of no more than 200 * 200 pixels. This size specification is merely a guideline. Internet Explorer 4 does not itself enforce any restrictions on the size of an Active Desktop item. 

  • Avoid pop-up messages. Today it is common for ActiveX controls, Java applets, and scripting content to notify the user of error messages or warnings by using modal dialog boxes that overlap the browser window. This is fine when the browser window is in the foreground. However, launching a modal dialog box from an Active Desktop item may confuse the user. If an Active Desktop item delivers a pop-up message to the user while the desktop is not in the foreground, the user may not be sure where the message came from or what to do about it. The typical situation to avoid is showing error messages when an Active Desktop item can't connect to the server. In these cases, the item should display some type of status message in the Active Desktop item itself, preferably with a hot spot or link that lets the user get more information and figure out how to proceed. 

  • Use the default color palettes. A large percentage of Internet Explorer 4 users have displays that are limited to 256 colors. For these users, Internet Explorer chooses a default palette that is intended to give a broad range of hues across the entire color spectrum. Therefore, when authoring an Active Desktop item, it is important to keep in mind exactly what the image colors will look like on a 256-color display. 

  • Include a rating tag in your item. Content Advisor is a feature in Internet Explorer that allows parents and supervisors to filter out Web content based on rating labels. This feature is based on the World Wide Web Consortium (W3C) standard for content ratings, known as PICS ( https://www.w3.org/PICS/ ), or Platform for Internet Content Selection. (For more information about PICS, see Part 7.) Web publishers should include a rating tag in their HTML files because someone browsing with the Content Advisor turned on will not be able to see content that is not rated. For more information, see the Microsoft Internet Client SDK

  • Handle expiration dates. Web publishers can define an expiration date for time-sensitive desktop items. This information is specified by the EndDate attribute of the SCHEDULE element in the CDF file. For example, a typical desktop item schedule might look like this: 

    <SCHEDULE ENDDATE="1998.11.05T08:15-0500">
    <INTERVALTIME DAY="1" />
    <EARLIESTTIME HOUR="12" />
    <LATESTTIME HOUR="18" />
    </SCHEDULE>
    

    This schedule shows that on November 5, 1998, Internet Explorer will stop refreshing this desktop item's data from the source URL. The desktop item will remain on the user's desktop, but its content will become stale. A few days before the desktop item expires, Web publishers should use a notification page to replace the content to which the desktop item points. This page should explain to users that the desktop item is no longer valid and that they should either close it or get a new one. The actual desktop item should not be deleted from the HTTP server until after the expiration date, to avoid having broken desktop items on users' desktops. 

Creating CDF Files for Active Desktop Items

The primary rule in creating Active Channels is that you are required to create a separate CDF file for each Active Desktop item or Active Channel you author. The basic syntax includes the ITEM and USAGE elements. (Remember, for a full explanation of how to create CDF files, see "Creating CDF Files" in Chapter 16.)

The CDF for an Active Desktop item must include at least one ITEM element under the top-level CHANNEL element, with a USAGE child element marked as "DesktopComponent" (see the example below). It is this USAGE element that tells Internet Explorer that the CDF file refers to an Active Desktop item, as opposed to another type of Active Channel. The CDF file should also include a SCHEDULE element to indicate when the item will be updated.

Since an Active Desktop item comprises a single HTML page, the only ITEM you need to include in the CDF file is the small Web page you want to embed in the user's desktop. This should be marked with the USAGE element as indicated in the example below. If you like, you can include additional ITEM elements for each page to which the Active Desktop item links. Including these as ITEMs in the CDF file has the additional benefit of keeping those pages "subscribed to" and available for offline viewing. The ITEMs, other than the actual Active Desktop item URL, are not exposed to the user. Note that this differs from Active Channels, which present a hierarchical list of ITEM tags to the user in the form of the Internet Explorer Channel Bar.

The following restrictions are placed on CDF files for Active Desktop items:

  • If a CDF file has more than one ITEM element marked <Usage VALUE="DesktopComponent">, Internet Explorer uses the first one it encounters. 

  • Only the top-level CHANNEL element is valid. Nested CHANNEL elements have no effect, because these additional items don't correspond to any list or hierarchy that the user can access. 

  • USAGE elements set to anything other than "DesktopComponent" are ignored. 

CDF Example for an Active Desktop Item

The following example shows a CDF file for an Active Desktop item.

<?XML VERSION="1.0"?>
<CHANNEL>

<SCHEDULE ENDDATE="1998.11.05T08:15-0500">
<INTERVALTIME DAY="1" />
<EARLIESTTIME HOUR="12"/>
<LATESTTIME HOUR="18"/>
</SCHEDULE>

<ITEM Href="/" LASTMOD="1996.11.05T08:15-
0500">
<Title>My News Ticker</Title> <!-- Friendly name -->
<USAGE VALUE="DesktopComponent"> <!-- Required -->
<OPENAS VALUE="HTML"/> <!-- "HTML" (default) or "Image" -->
<WIDTH VALUE="200" /> <!-- Width in pixels -->
<HEIGHT VALUE="80" /> <!-- Height in pixels -->
<CANRESIZE VALUE="Yes"/> <!-- Yes (default) or No -->
</USAGE>
</ITEM>

but -->

cache. -->

<ITEM HREF="https://www.samplesports.com/topstories.html"
LASTMOD="1996.11.05T08:15-0500" >
</ITEM>

</CHANNEL>

Offering the Active Desktop Item to Users

Once you've designed your Active Desktop item and created its CDF file, you will need to make the CDF file available on your Web server. As with Active Channels, a link or button should be placed on any Web page that references the CDF file to allow users to subscribe to the new Active Desktop item. When the user clicks the link, Internet Explorer 4 automatically detects the USAGE element, which tells it that the CDF refers to an Active Desktop item.

Internet Explorer 4 then activates the Active Desktop item Subscription Wizard on the user's computer and allows the user to receive updated information about this Active Desktop item. As the content contained in the Active Desktop item is added, removed, or modified, Web publishers should update the CDF file to reflect the changes.

Dd423379.spacer(en-us,TechNet.10).jpg