home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Windows Gam…ming Gurus (2nd Edition) / Disc2.iso / msdn_vcb / samples / vc98 / sdk / graphics / ba / schsamp / readme.txt < prev    next >
Text File  |  1997-09-23  |  9KB  |  211 lines

  1. Microsoft(R) ActiveX(TM) component that schedules a Broadcast Architecture show reminder
  2.  
  3. This Readme file contains the following sections:
  4. * Summary        Briefly describes the sample
  5. * More Information    Details how to compile and run the sample
  6. * About SchSamp        Describes the sample in more detail.
  7. * Using SchSamp        Explains how to use SchSamp from a Web page.
  8.  
  9. For more information about how to write applications that schedule
  10. show reminders, see Scheduling Show Reminders in the 
  11. Broadcast Architecture Programmer's Reference.
  12.  
  13. SUMMARY
  14. =========
  15. The SchSamp sample, SchSamp.dll, is an ActiveX component that 
  16. schedules a show reminder using the IScheduledItems interface 
  17. available from Television System Services, Tssadmin.dll. TV Viewer 
  18. is used to display the reminder dialog box when the reminder runs.
  19.  
  20. SchSamp was developed using the Microsoft(R) Visual Basic(R) 
  21. programming system, version 5.0, including Microsoft(R) 
  22. Visual Basic(R) Scripting Edition (VBScript).
  23.  
  24. MORE INFORMATION
  25. ================
  26. SchSamp must be compiled and run on a computer running 
  27. the Microsoft(R) Windows(R) 98 operating system with 
  28. the TV Viewer components installed. Running Windows 98 with 
  29. TV Viewer installs and registers Television System Services 
  30. and TV Viewer, both of which are required for SchSamp to run.
  31.  
  32. The following information describes the SchSamp sample.
  33.  
  34. To Compile SchSamp
  35. -------------------
  36. Open the SchSamp project file, SchSamp.vdp, in Visual Basic 5.0. 
  37. On the File menu, click Make SchSamp.dll.
  38.  
  39. To compile the component into a .cab file for distribution 
  40. on the Internet, use the Application Setup Wizard provided with 
  41. Visual Basic 5.0. Click Create Internet Download Setup.
  42.  
  43. This control is unsigned. If you wish to distribute a version of 
  44. SchSamp on the Web, you should sign the component. For instructions on 
  45. how to sign a .cab file, see the Internet Client Software Development 
  46. Kit (SDK).
  47.  
  48. To Set Up the Programming Environment
  49. ----------------------------------------------------
  50. First, create a new ActiveX DLL project. Set the class to global, multiuse. 
  51. Then set a project reference to the Microsoft Television Services, Tssadmin.dll. 
  52. Doing this gives you access to the TelevisionServices, TaskTrigger, and 
  53. ScheduledItems objects. If you are unable to locate Microsoft Television Services 
  54. in References, check that the optional TV Viewer component of Windows 98 
  55. is installed on your computer.
  56. You must also set a reference to the Microsoft Data Access Objects (DAO) 
  57. version 3.5 object library. Doing this enables your application to create 
  58. the DAO workspace required by the ScheduledItems object.
  59.  
  60. To Run SchSamp
  61. ---------------
  62. The SchSamp sample includes a version of the component that has already
  63. been compiled into a .cab file for delivery through a Web page. The .cab 
  64. file has not been signed, and thus in order to run the sample you must set 
  65. security in Microsoft(R) Internet Explorer version 4.0 to allow unsigned 
  66. controls to run.
  67.  
  68. To do this, on the View menu click Internet Options. Click the 
  69. Security tab. Set Security settings for the appropriate zone. If you plan 
  70. to run SchSamp from your machine, this should be the Local Intranet zone.
  71.  
  72. Once the security is properly set, open SchSamp.html with Internet Explorer 4.0.
  73. The SchSamp component automatically downloads and installs on your computer. 
  74. To run the script that sets the show reminder, click Schedule Reminder.
  75.  
  76. Note:  You cannot set a reminder for a show that has already occurred. 
  77. The HTML Web currently is scripted to set a reminder for the show "Maid to Order"
  78. on 8/5/97 at 3 P.M. If the current date is after 8/5/97, the sample does not run. 
  79. To correct this, edit the following lines of the HTML file:
  80.  
  81. SchSamp.Episode = "Maid to Order"
  82. SchSamp.Network = ""
  83. SchSamp.Duration = "120"
  84. SchSamp.ShowTime = "8/5/97 3:00:00 PM"
  85.  
  86. Change the preceding lines to reflect a future episode. 
  87.  
  88. For best results, choose an episode from the 
  89. TV Viewer Program Guide. Doing so enables SchSamp to match the episode in 
  90. the Guide database and obtain description and tuning information.
  91.  
  92. Note: Because SchSamp uses the IScheduledItems interface, you cannot use the 
  93. Search page of TV Viewer to view a sample set with SchSamp. To test whether 
  94. the reminder was set, follow the instructions detailed in SchSamp.htm.
  95.  
  96. SchSamp Files
  97. --------------
  98. SchSamp.html is an HTML/VBScript file uses SchSamp to set a show reminder.
  99.  
  100. SchSamp.cab contains a compiled version of SchSamp.            
  101.  
  102. SchSamp.vbp is the Visual Basic project file.
  103.  
  104. SchSamp.cls contains the Visual Basic class module
  105.  
  106. ABOUT SCHSAMP
  107. ===============
  108. SchSamp is an ActiveX component that schedules a TV Viewer 
  109. reminder for a broadcast show. At a specified amount of time before 
  110. the show starts, the reminder runs, causing TV Viewer to display 
  111. a dialog box to the user. This dialog box states that the show is about to start 
  112. and offers the user the option to tune to that channel. This component 
  113. can be used, for example, on an television enhancement page so 
  114. users can schedule a reminder for next week's episode. 
  115.  
  116. Note: Reminders that are set by any means other than 
  117. ITVViewer::SetReminder cannot be viewed from the Search page of 
  118. TV Viewer when a user selects MyReminders from the Categories list. 
  119. Neither does a reminder icon appear in that program's details list. 
  120. However, TV Viewer still presents a reminder dialog box when 
  121. the reminder runs.
  122.  
  123. USING SCHSAMP
  124. ==============
  125. Because SchSamp is implemented as an ActiveX component, it can be called 
  126. from a variety of programming environments, such as VBScript or 
  127. Microsoft(R) JScript(TM) development software on a Web page, Visual Basic, 
  128. Java, or C++. The code examples in the following topics use Web-based 
  129. VBScript to call SchSamp.
  130.  
  131. Note: The SchSamp component is not signed. In order to run the sample, 
  132. you must set security in your Web browser to allow unsigned controls to run. 
  133. For more information on how to do this, see the Readme.txt file installed 
  134. with SchSamp. For information on how to sign a component for Internet 
  135. download, see the Internet Client SDK.
  136.  
  137. Note: The following topics describe how to create an instance of SchSamp, 
  138. pass episode data, and set a show reminder for the specified episode.
  139.  
  140. Inserting SchSamp in a Web Page
  141. ------------------------------------------------------
  142. You can call the SchSamp component from a Web page. To create an instance 
  143. of the component, insert the following object tag into the HTML file:
  144.  
  145. <OBJECT ID="MySchSamp"
  146. CLASSID="CLSID:BE521C45-08DA-11D1-98AE-080009DC95C5"
  147. CODEBASE="SchSamp.CAB#version=1,0,0,0">
  148. </OBJECT>
  149.  
  150. Set the ID parameter to specify a name for this instance of the control. In the 
  151. preceding example, it is set to MySchSamp. The CLASSID parameter lists 
  152. the unique identifier for the SchSamp class and must appear exactly as 
  153. above. The CODEBASE parameter points to the .cab file that contains the 
  154. compiled SchSamp component and its supporting files. 
  155.  
  156. Specifying Episode Data
  157. -------------------------------
  158. The SchSamp component contains the following properties. 
  159.  
  160. Property        Data type    Description
  161. -----------        -------------    ----------------
  162. Episode        String        Title of the episode.
  163. Network        String        If applicable, the network on which the episode appears.
  164. Duration        String        Length of the episode, in minutes.
  165. ShowTime    String        Time and date that the episode starts.
  166. PreTime        Long        The number of minutes early that the reminder should run.
  167.  
  168. These properties store data about the episode for which you want to set a reminder. 
  169. You must set values for them before you call SchSamp.SetReminder to schedule 
  170. the show reminder. 
  171.  
  172. The following example uses VBScript in a Web page to set values for the 
  173. SchSamp properties. 
  174.  
  175. <SCRIPT LANGUAGE = VBScript>
  176. Sub SetIt_OnClick
  177.       'set the show's properties
  178.       SchSamp.Episode = "Maid to Order"
  179.       SchSamp.Network = ""
  180.       SchSamp.Duration = "120"
  181.       SchSamp.ShowTime = "8/5/97 3:00:00 PM"
  182.       SchSamp.PreTime = 5
  183.  
  184.       'Schedule the reminder
  185.       SchSamp.SetReminder
  186. End Sub
  187. </SCRIPT>
  188.  
  189. Note that you cannot set a reminder for a show that has already occurred. The HTML 
  190. file installed with SchSamp is scripted to set a reminder for the show "Maid to Order" 
  191. on 8/5/97 at 3 P.M. If the current date is after 8/5/97, the sample does not run. 
  192. To correct this, edit the preceding lines to reflect a future episode:
  193.  
  194. For best results, choose an episode from the TV Viewer program guide. Doing so 
  195. enables SchSamp to match the episode in the Guide database and obtain description 
  196. and tuning information.
  197.  
  198. Scheduling the Show Reminder
  199. ---------------------------------------
  200. Once the properties of SchSamp are set as described in the Broadcast Architecture 
  201. Programmer's Reference topic Specifying Episode Data, call the SchSamp.SetReminder 
  202. method to create the show reminder. This is illustrated in the following example.
  203.  
  204. <SCRIPT LANGUAGE = VBScript>
  205.   'Schedule the reminder
  206.    SchSamp.SetReminder
  207. </SCRIPT>
  208.  
  209.  
  210.  
  211.