HOWTO: Use the TDC in an Active Desktop Item
ID: Q185122
|
The information in this article applies to:
-
Microsoft Internet Explorer (Programming) versions 5.0, 4.0
SUMMARY
With Active Desktop, Internet Explorer 4.0 introduced an exciting new
technology that brings the Web to a user's desktop--Active Desktop items.
Also, called desktop components, these provide Internet Content Providers
(ICPs) a great opportunity to present their content in an immediate and
condensed manner on a user's desktop. The Internet Explorer 5 download does not install the Windows Desktop Update. If it is not installed, you will receive an error message. The only way to install the Active Desktop on a fresh system is to first install Internet Explorer 4.01 Service Pack 1 and then install Internet Explorer 5. In the future, the Active Desktop will be part of windows, not Internet Explorer.
Internet Explorer 4.0 also introduced the Tabular Data Control (TDC), found
in the file Tdc.ocx, an ActiveX control that can be hosted in Internet
Explorer 4.0 or later to display data stored in a delimited text file. This article
talks about a sample scenario where the Tabular Data Control is used in an
Active Desktop item, including the details of implementation.
MORE INFORMATION
This sample demonstrates how an Active Desktop item can be used effectively
to display the schedule for regularly occurring technical talks (TechTalk)
in a small group in an organization. This desktop item can then be
distributed to the group so that the schedule is immediately accessible to
everyone from their desktops.
The sample stores the schedule data in a comma-delimited text file, which
is then displayed by the Tabular Data Control into a Web page. The
following steps illustrate how to re-create the sample:
- Create a file called BBSched.htm that will display the TechTalk
schedule in a condensed format. In this sample, the Marquee control is
used to scroll the data retrieved from the data file within the
specified boundaries. Insert this HTML into the file.
<HTML>
<BODY BGCOLOR=BLACK ALINK=YELLOW VLINK=YELLOW>
<font style="font: 18pt verdana;
font-weight: bold;
color: #424242">Weekly TechTalk Schedule</FONT>
<TABLE border=0 WIDTH=100%>
<tr>
<th align=center BGCOLOR=#800000 COLSPAN=1><FONT SIZE=1
STYLE="Arial" COLOR=white>Date</FONT></th>
<th align=center BGCOLOR=#800000 COLSPAN=2><FONT SIZE=1
STYLE="Arial" COLOR=white>Topics</FONT></th>
<th align=center BGCOLOR=#800000 COLSPAN=1><FONT SIZE=1
STYLE="Arial" COLOR=white>Speaker</FONT></th>
</tr>
</TABLE>
<OBJECT ID=Marquee1 WIDTH=400 HEIGHT=35
CLASSID=CLSID:1A4DA620-6217-11CF-BE62-0080C72EDD2D>
<PARAM NAME=ScrollPixelsX VALUE=0>
<PARAM NAME=ScrollPixelsY VALUE=-1>
<PARAM NAME=ScrollDelay VALUE=150>
<PARAM NAME=szURL VALUE=input.htm>
</OBJECT>
</BODY>
</HTML>
- Create the .csv file, (save it as Sched.csv), a comma-delimited text
file that will feed data into the TDC:
bb_date:STRING,bb_topic:STRING,bb_speaker:STRING
'09-18','Windows CE Overview','John Streams'
'09-25','Active Server Pages in IIS 4.0','Paul Brown'
'10-14','Developing Components with ATL','Mark Beaver'
'10-21','Internet Database Strategy','Stephen Roberts'
- The Marquee control in step 1 above takes an .htm page as a parameter,
and scrolls that .htm page within its specified boundaries.
Create this .htm file and save it as Input.htm. This file contains the
TDC and displays the data retrieved from the Sched.csv above. Insert
this HTML into Input.htm.
<HTML>
<BODY BGCOLOR=BLACK>
<OBJECT id=tdcSchedule
CLASSID="clsid:333C7BC4-460F-11D0-BC04-0080C7055A83">
<PARAM NAME="DataURL" VALUE="sched.csv">
<PARAM NAME="UseHeader" VALUE="True">
<PARAM NAME="TextQualifier" VALUE="'">
</OBJECT>
<TABLE datasrc=#tdcSchedule border=0 CELLSPACING=12 WIDTH=65%>
<SPAN STYLE="font-size:6pt">
<TBODY>
<tr><td VALIGN=TOP NOWRAP><FONT COLOR=WHITE SIZE=2 STYLE="Arial">
<DIV datafld="bb_date"></DIV></FONT></td>
<td VALIGN=TOP ><FONT COLOR=WHITE SIZE=2 STYLE="Arial">
<DIV datafld="bb_topic"></DIV></FONT></td>
<td VALIGN=TOP ><FONT COLOR=WHITE SIZE=2 STYLE="Arial">
<DIV datafld="bb_speaker"></DIV></FONT></td>
</tr>
</TBODY>
</SPAN>
</TABLE>
<hr>
</BODY>
</HTML>
- Create the CDF file for the component. Save the file as TechTalk.cdf.
Note that a separate <ITEM> tag is used for Input.htm in order to ensure
that the file is cached, and is therefore available for the desktop item
even when the user is browsing offline:
<CHANNEL>
<SCHEDULE>
<INTERVALTIME DAY="1"/>
</SCHEDULE>
<ITEM HREF="http://<your server name>bbsched.htm">
<TITLE>Weekly TechTalks Active Desktop Item</TITLE>
<USAGE VALUE="DesktopComponent">
<OpenAs VALUE="HTML" />
<Width VALUE="400" />
<Height VALUE="130" />
</USAGE>
</ITEM>
<ITEM HREF="http://<your server name>input.htm">
<USAGE VALUE="NONE" />
</ITEM>
</CHANNEL>
- Run CDFTest.exe and XMLint.exe (available in the \Inetsdk\Bin\Cdftest\
and \Inetsdk\Bin\Xmlint\ directories, respectively) on your CDF file to
check for syntax errors. Make sure all errors are resolved before going
on to step 6 below.
- Type the URL to TechTalk.cdf, created in step 4 above, from Internet
Explorer's address bar. Assuming there are no errors in your CDF file, a
dialog box should come up, asking if you want to add the desktop item to
your desktop. Click on Yes and verify that the desktop item is added
to your desktop, and that data from Sched.csv is rendered by the TDC
correctly.
REFERENCES
Tabular Data Control documentation under the "Component Library" section of
the Internet Client SDK:
http://msdn.microsoft.com/redirs/inetsdkredir.asp
Creating Active Desktop Items under the "Authoring for New Delivery
Mechanisms" section of the Internet Client SDK
(c) Microsoft Corporation 1997, All Rights Reserved.
Contributions by Lanie Kurata, Microsoft Corporation
Additional query words:
TDC InetSDKActiveDesktop kbDSupport kbdsi
Keywords : kbIE400 kbIE500 InetSDKActiveDeskt
Version : WINDOWS:4.0
Platform : WINDOWS
Issue type : kbhowto
|