Microsoft KB Archive/167595

= FP: How to Create a Script for the Marquee Control =

Article ID: 167595

Article Last Modified on 8/10/2001

-

APPLIES TO


 * Microsoft FrontPage 97 Standard Edition

-



This article was previously published under Q167595



SUMMARY
You can use the Marquee control to add a dynamic look to your Web pages. This article describes a method to use a control that scrolls a separate page within the current page and creates two buttons that allow you to control the scrolling speed of the marquee.

NOTE: You can combine ActiveX controls to add greater functionality to your Web pages than would be possible with a single control.



MORE INFORMATION
WARNING: ANY USE OF THE CODE PROVIDED IN THIS ARTICLE IS AT YOUR OWN RISK. Microsoft provides this code "as is" without warranty of any kind, either express or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose.

Use the following steps to create a control that scrolls a separate page and uses two buttons to control the scrolling speed of the marquee:  Open a Web page in FrontPage Editor. On the Insert menu, point to Other Components, and then click ActiveX control. In the Pick A Control list box, click MarqueeCtl Object. In the Name box, enter a name for the MarqueeCtl Object. For example, type "Marquee" (without the quotation marks). Click Properties. In the Object Parameters dialog box, click Add. In the Name box, enter "szURL" (without the quotation marks). Under Value, in the Data box, enter the following Uniform Resource Locator (URL):

http://www.microsoft.com

</li> Click OK two times.</li> In the ActiveX Control Properties dialog box, click Extended.</li> Click Add.</li> In the Name box, enter "TYPE" (without the quotation marks). In the Value box, enter "application/x-oleobject" (without the quotation marks). Click OK.</li> Click OK two more times.</li> On the Insert menu, point to Form Field, and then click Push Button.</li> Right-click the form field, and then click Form Field Properties.</li> In the Name box, enter "BtnFast" (without the quotation marks). In the Value/Label box, enter "Fast"(without the quotation marks). Click Normal. Click OK.</li> Repeat steps 13 and 14.</li> In the Name box, enter "BtnSlow" (without the quotation marks). In the Value/Label box, enter "Slow" (without the quotation marks). Click Normal. Click OK.</li> Right-click the form area, and click Script Wizard.</li>  In the Event pane, double-click BtnSlow, and then click onClick. In the Action pane, double-click Marquee, and then double-click ScrollDelay.

The following code appears in the Script pane: Sub BtnSlow_Onclick Marquee1.ScrollDelay </li>  Place the insertion point immediately following the "Marquee1.ScrollDelay" code and type "=200" (without the quotation marks), so that the code looks like this: Sub BtnSlow_Onclick Marquee1.ScrollDelay=200 </li>  In the Event pane, double-click BtnFast, and then click onClick. In the Action pane, double-click Marquee, and then double-click ScrollDelay.

The following code appears in the Script pane: Sub BtnFast_Onclick Marquee1.ScrollDelay </li>  Place the insertion point immediately following the "Marquee1.ScrollDelay" code and type "=0" (without the quotation marks), so that the code looks like this: Sub BtnSlow_Onclick Marquee1.ScrollDelay=0 </li> <li>Click OK.</li></ol>

When you view the page in a Web browser, the Microsoft World Wide Web home page will scroll within the current Web page.

Additional query words: fp97, marquee, fpscript

Keywords: kbhowto kbinterop kbcode KB167595

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.