3-D Frames and Panels

3-D frames usually enclose other controls, indicating that they go together. For example, here is a 3-D frame with the caption "Vote" that encloses two buttons, Yes and No:


	-- Vote -------------------
          |                           |
          |    -------     --------   |
          |   |  Yes  |   |   No   |  |
          |    -------     --------   |
          |                           |
           ---------------------------

3-D panels give the appearance of being raised. If you give them a caption, it appears in the center:


	---------------------------
          |                           |
          |   Ace Computer Co Inc.    |
          |                           |
           ---------------------------

Let's add such controls to our Web page. We first add a 3-D frame:

<HTML>
    <HEAD>
    <TITLE>OCX Control Page</TITLE>
    </HEAD>
    <BODY LANGUAGE = VBScript ONLOAD = "Page_Initialize">
    <CENTER>
    <H1>OCX Control Page</H1>
    </CENTER>
        .
        .
        .
    <!- SSFrame>
    <PRE>
--> SSFrame:   <OBJECT CLASSID="clsid:0BA686AF-F7D3-101A-993E-0000C0EF6F5E"
                   HEIGHT=30 WIDTH=70 ID=Frame1></OBJECT>
    </PRE>
        .
        .
        .

Then we add a 3-D panel:

<HTML>
    <HEAD>
    <TITLE>OCX Control Page</TITLE>
    </HEAD>
    <BODY LANGUAGE = VBScript ONLOAD = "Page_Initialize">
    <CENTER>
    <H1>OCX Control Page</H1>
    </CENTER>
        .
        .
        .
    <!- SSFrame>
    <PRE>
    SSFrame:   <OBJECT CLASSID="clsid:0BA686AF-F7D3-101A-993E-0000C0EF6F5E"
                   HEIGHT=30 WIDTH=70 ID=Frame1></OBJECT>
    </PRE>
    <!- SSPanel>
    <PRE>
--> SSPanel:   <OBJECT CLASSID="clsid:0BA686B9-F7D3-101A-993E-0000C0EF6F5E"
                   HEIGHT=30 WIDTH=70 ID=Panel1></OBJECT>
    </PRE>
       .
       .
       .

Then we add captions for both controls:

<HTML>
    <HEAD>
    <TITLE>OCX Control Page</TITLE>
    </HEAD>
    <BODY LANGUAGE = VBScript ONLOAD = "Page_Initialize">
    <CENTER>
    <H1>OCX Control Page</H1>
    </CENTER>
        .
        .
        .
    <!- SSFrame>
    <PRE>
    SSFrame:   <OBJECT CLASSID="clsid:0BA686AF-F7D3-101A-993E-0000C0EF6F5E"
                   HEIGHT=30 WIDTH=70 ID=Frame1></OBJECT>
    </PRE>
    <!- SSPanel>
    <PRE>
    SSPanel:   <OBJECT CLASSID="clsid:0BA686B9-F7D3-101A-993E-0000C0EF6F5E"
                   HEIGHT=30 WIDTH=70 ID=Panel1></OBJECT>
    </PRE>
       .
       .
       .
    <SCRIPT LANGUAGE = VBScript>
            Sub Page_Initialize
                  Cmd1.Caption = "Hello"
   -->            Frame1.Caption = "Frame"
   -->            Panel1.Caption = "Panel"
            End Sub
    </SCRIPT>
    </BODY>
    </HTML>

These two new controls also appear in Figure 6.1. Now that we've reviewed the process of inserting ActiveX controls, let's turn to a more substantial control: the grid control.

© 1996 by Steven Holzner. All rights reserved.