Microsoft KB Archive/190953

= FP97: Sample Script to Scroll Page in Marquee Control =

Article ID: 190953

Article Last Modified on 8/10/2001

-

APPLIES TO


 * Microsoft FrontPage 97 Standard Edition

-



This article was previously published under Q190953



SUMMARY
You can use the Marquee control to add a dynamic look to your Web pages. This article provides sample code for using 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:  Start FrontPage Editor and open a Web page.  On the Insert menu, point to Other Components and then click ActiveX Control. Perform the following steps:  From the Pick A Control list, click MarqueeCtl Object. In the Name box, type the name you want. For example, type Marquee . Click Properties. In the Object Parameters dialog box, click Add. In the Name box, type szURL. 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. In the Value box, type application/x-oleobject. Click OK.</li> Click OK two more times.</li></ol> </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 on the menu that appears. In the Form Field Properties dialog box, follow these steps: <ol> In the Name box, type BtnFast .</li> In the Value/Label box, type Fast .</li> Click Normal.</li> Click OK.</li> Repeat steps b and c.</li> In the Name box, type BtnSlow .</li> In the Value/Label box, type Slow .</li> Click Normal.</li> <li>Click OK.</li></ol> </li> <li>Right-click the form area, and then click Script Wizard on the menu that appears. Perform the following steps: <ol> <li>In the Event pane, double-click BtnSlow and then click onClick.</li> <li> 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> <li> Click immediately after the "Marquee1.ScrollDelay" code and type =200. Your code should look like this: Sub BtnSlow_Onclick Marquee1.ScrollDelay=200 </li> <li>In the Event pane, double-click BtnFast and then click onClick.</li> <li> 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> <li> Click immediately after the "Marquee1.ScrollDelay" code and type =0. Your code should look like this: Sub BtnSlow_Onclick Marquee1.ScrollDelay=0 </li> <li>Click OK.</li></ol> </li></ul> </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: 97 ActiveX Marquee Control Scripting

Keywords: kbinfo kbfaq KB190953

-

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

© Microsoft Corporation. All rights reserved.