home *** CD-ROM | disk | FTP | other *** search
/ ActiveX for Dummies / ACTIVE_X.iso / chap10 / colorchn.alx < prev    next >
Text File  |  1996-10-27  |  3KB  |  71 lines

  1.  
  2. <SCRIPT LANGUAGE="VBScript">
  3. <!--
  4. dim XScale
  5. dim YScale
  6. dim MaxColor
  7. MaxColor = 65535
  8.  
  9. Sub ChangingLabel_MouseMove(Button, Shift, X, Y)
  10.    ChangingLabel.BackColor = INT(X * XScale)
  11.    ChangingLabel.ForeColor = INT(Y * YScale)
  12.    XVal.Text = X
  13.    YVal.Text = Y
  14. end sub
  15.  
  16. Sub Layout_OnLoad()
  17.     XScale = INT(MaxColor/ChangingLabel.Width)
  18.     YScale = INT(MaxColor/ChangingLabel.Height)
  19. end sub
  20. -->
  21. </SCRIPT>
  22. <DIV ID="Layout" STYLE="LAYOUT:FIXED;WIDTH:278pt;HEIGHT:164pt;">
  23.     <OBJECT ID="ChangingLabel"
  24.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:23pt;LEFT:31pt;WIDTH:200pt;HEIGHT:50pt;ZINDEX:0;">
  25.         <PARAM NAME="BackColor" VALUE="16718898">
  26.         <PARAM NAME="VariousPropertyBits" VALUE="276824091">
  27.         <PARAM NAME="Caption" VALUE="The Incredible, Ever-Changing Color Label">
  28.         <PARAM NAME="Size" VALUE="7056;1764">
  29.         <PARAM NAME="SpecialEffect" VALUE="1">
  30.         <PARAM NAME="FontHeight" VALUE="280">
  31.         <PARAM NAME="FontCharSet" VALUE="0">
  32.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  33.         <PARAM NAME="FontWeight" VALUE="0">
  34.     </OBJECT>
  35.     <OBJECT ID="XVal"
  36.      CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3" STYLE="TOP:94pt;LEFT:55pt;WIDTH:70pt;HEIGHT:31pt;TABINDEX:1;ZINDEX:1;">
  37.         <PARAM NAME="VariousPropertyBits" VALUE="746604571">
  38.         <PARAM NAME="Size" VALUE="2469;1094">
  39.         <PARAM NAME="FontHeight" VALUE="240">
  40.         <PARAM NAME="FontCharSet" VALUE="0">
  41.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  42.         <PARAM NAME="FontWeight" VALUE="0">
  43.     </OBJECT>
  44.     <OBJECT ID="XLabel"
  45.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:94pt;LEFT:31pt;WIDTH:16pt;HEIGHT:31pt;ZINDEX:2;">
  46.         <PARAM NAME="Caption" VALUE="X">
  47.         <PARAM NAME="Size" VALUE="564;1094">
  48.         <PARAM NAME="FontHeight" VALUE="480">
  49.         <PARAM NAME="FontCharSet" VALUE="0">
  50.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  51.         <PARAM NAME="FontWeight" VALUE="0">
  52.     </OBJECT>
  53.     <OBJECT ID="YLabel"
  54.      CLASSID="CLSID:978C9E23-D4B0-11CE-BF2D-00AA003F40D0" STYLE="TOP:94pt;LEFT:140pt;WIDTH:16pt;HEIGHT:31pt;ZINDEX:3;">
  55.         <PARAM NAME="Caption" VALUE="Y">
  56.         <PARAM NAME="Size" VALUE="564;1094">
  57.         <PARAM NAME="FontHeight" VALUE="480">
  58.         <PARAM NAME="FontCharSet" VALUE="0">
  59.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  60.         <PARAM NAME="FontWeight" VALUE="0">
  61.     </OBJECT>
  62.     <OBJECT ID="YVal"
  63.      CLASSID="CLSID:8BD21D10-EC42-11CE-9E0D-00AA006002F3" STYLE="TOP:94pt;LEFT:164pt;WIDTH:70pt;HEIGHT:31pt;TABINDEX:4;ZINDEX:4;">
  64.         <PARAM NAME="VariousPropertyBits" VALUE="746604571">
  65.         <PARAM NAME="Size" VALUE="2469;1094">
  66.         <PARAM NAME="FontHeight" VALUE="240">
  67.         <PARAM NAME="FontCharSet" VALUE="0">
  68.         <PARAM NAME="FontPitchAndFamily" VALUE="2">
  69.         <PARAM NAME="FontWeight" VALUE="0">
  70.     </OBJECT>
  71. </DIV>