home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 26 / CD_ASCQ_26_1295.iso / vrac / pzdemo.zip / GRADIENT.FRM < prev    next >
Text File  |  1995-09-04  |  7KB  |  208 lines

  1. VERSION 2.00
  2. Begin Form GradientFrm 
  3.    Caption         =   "Gradients, Gradients, Gradients"
  4.    ClientHeight    =   4200
  5.    ClientLeft      =   4020
  6.    ClientTop       =   2460
  7.    ClientWidth     =   7230
  8.    ClipControls    =   0   'False
  9.    Height          =   4605
  10.    Icon            =   GRADIENT.FRX:0000
  11.    Left            =   3960
  12.    LinkTopic       =   "Form1"
  13.    ScaleHeight     =   4200
  14.    ScaleWidth      =   7230
  15.    Top             =   2115
  16.    Width           =   7350
  17.    Begin PZLabel NoteLab 
  18.       Alignment       =   0  'Left Justify - TOP
  19.       BackStyle       =   0  'Transparent
  20.       Caption         =   "Check out this new faded drop shadow!"
  21.       ForeColor       =   &H0000FFFF&
  22.       Height          =   255
  23.       Left            =   1680
  24.       TabIndex        =   4
  25.       Top             =   1020
  26.       Width           =   3555
  27.       WordWrap        =   -1  'True
  28.    End
  29.    Begin PZLabel GradLab 
  30.       BackColor       =   &H0080C0FF&
  31.       BevelInner      =   1  'Inset
  32.       BevelInnerShading=   3  'Frame
  33.       BevelInnerWidth =   1
  34.       BevelOuter      =   2  'Raised
  35.       BevelOuterShading=   2  'Dark
  36.       BevelOuterWidth =   3
  37.       BorderInner     =   2  'Filled
  38.       BorderInnerWidth=   3
  39.       BorderOuter     =   5  'Faded Shadow
  40.       BorderOuterWidth=   14
  41.       Caption         =   "Gradients & Drop Shadows!"
  42.       CornerBackColor =   &H00C00000&
  43.       CornerSize      =   4
  44.       DirectDraw      =   0   'False
  45.       Font3D          =   4  'Drop Right
  46.       Font3DColor     =   &H00808080&
  47.       Font3DSize      =   4
  48.       FontBold        =   -1  'True
  49.       FontItalic      =   0   'False
  50.       FontName        =   "Arial"
  51.       FontSize        =   19.5
  52.       FontStrikethru  =   0   'False
  53.       FontUnderline   =   0   'False
  54.       ForeColor       =   &H00FF0000&
  55.       GradientColor   =   &H00C0C0C0&
  56.       GradientStyle   =   1  'Vertical
  57.       Height          =   1155
  58.       Index           =   0
  59.       Left            =   630
  60.       TabIndex        =   1
  61.       Top             =   90
  62.       Width           =   5985
  63.    End
  64.    Begin PZLabel GradLab 
  65.       BackColor       =   &H00004000&
  66.       BevelOuter      =   2  'Raised
  67.       BevelOuterShading=   1  'Light
  68.       BorderOuterColor=   &H00400000&
  69.       BorderOuterWidth=   4
  70.       Caption         =   "These gradients are centered."
  71.       CaptionMargin   =   4
  72.       CornerSize      =   3
  73.       DirectDraw      =   0   'False
  74.       Font3D          =   2  'Block Right
  75.       Font3DColor     =   &H0000FFFF&
  76.       FontBold        =   -1  'True
  77.       FontItalic      =   0   'False
  78.       FontName        =   "MS Sans Serif"
  79.       FontSize        =   13.5
  80.       FontStrikethru  =   0   'False
  81.       FontUnderline   =   0   'False
  82.       ForeColor       =   &H000000FF&
  83.       GradientColor   =   &H0000FF00&
  84.       GradientStyle   =   6  'Horizontal Centered
  85.       Height          =   795
  86.       Index           =   1
  87.       Left            =   450
  88.       Picture         =   GRADIENT.FRX:0302
  89.       TabIndex        =   2
  90.       Top             =   3060
  91.       Width           =   2775
  92.       WordWrap        =   -1  'True
  93.    End
  94.    Begin PZLabel GradLab 
  95.       BackColor       =   &H00C000C0&
  96.       BevelOuter      =   2  'Raised
  97.       BevelOuterShading=   1  'Light
  98.       BorderOuterColor=   &H00400000&
  99.       BorderOuterWidth=   4
  100.       Caption         =   "It's very easy (and cheap)!"
  101.       CaptionMargin   =   20
  102.       CornerSize      =   3
  103.       DirectDraw      =   0   'False
  104.       Font3D          =   2  'Block Right
  105.       Font3DColor     =   &H00FF0000&
  106.       FontBold        =   -1  'True
  107.       FontItalic      =   0   'False
  108.       FontName        =   "MS Sans Serif"
  109.       FontSize        =   13.5
  110.       FontStrikethru  =   0   'False
  111.       FontUnderline   =   0   'False
  112.       ForeColor       =   &H0000FF00&
  113.       GradientColor   =   &H000000FF&
  114.       GradientStyle   =   7  'Diagonal Centered
  115.       Height          =   795
  116.       Index           =   2
  117.       Left            =   3930
  118.       Picture         =   GRADIENT.FRX:0380
  119.       TabIndex        =   3
  120.       Top             =   3060
  121.       Width           =   2805
  122.       WordWrap        =   -1  'True
  123.    End
  124.    Begin PZLabel GradPan 
  125.       BackColor       =   &H00FF0000&
  126.       BevelInnerWidth =   1
  127.       BorderInnerColor=   &H000080FF&
  128.       BorderInnerWidth=   4
  129.       Caption         =   "Horizontal, vertical and diagonal gradient fills are now supported by Pizazz."
  130.       CaptionMargin   =   10
  131.       CornerBackColor =   &H00000000&
  132.       DirectDraw      =   0   'False
  133.       Font3D          =   2  'Block Right
  134.       Font3DColor     =   &H000000FF&
  135.       Font3DSize      =   2
  136.       FontBold        =   -1  'True
  137.       FontItalic      =   0   'False
  138.       FontName        =   "MS Sans Serif"
  139.       FontSize        =   22.5
  140.       FontStrikethru  =   0   'False
  141.       FontUnderline   =   0   'False
  142.       ForeColor       =   &H0000FFFF&
  143.       GradientStyle   =   1  'Vertical
  144.       Height          =   4215
  145.       Left            =   0
  146.       TabIndex        =   0
  147.       Top             =   0
  148.       Width           =   7245
  149.       WordWrap        =   -1  'True
  150.    End
  151. End
  152. Option Explicit
  153.  
  154. Sub Form_Resize ()
  155.     Dim i As Integer
  156.     Dim w As Long, h As Long, h1 As Long
  157.  
  158.     ' no point chaging anything right now
  159.     PZdemo!Timer1.Enabled = False
  160.  
  161.     ' make these gradient labels disappear while the background is resized
  162.     For i = 0 To 2
  163.         GradLab(i).Visible = False
  164.         ' remove the old clipping region
  165.         GradLab(i).ClipCtl = 0
  166.     Next
  167.     NoteLab.Visible = False
  168.     NoteLab.ClipCtl = 0
  169.  
  170.     GradPan.Move 0, 0, ScaleWidth, ScaleHeight
  171.     w = ScaleWidth * .85
  172.     h = ScaleHeight * .3
  173.     If w < 6150 Then w = 6150
  174.     If h < 980 Then h = 980
  175.     GradLab(0).Move (GradPan.Width - w) \ 2, GradLab(0).Top, w, h
  176.     h1 = GradLab(0).Height * .75
  177.     w = GradPan.Width - GradLab(1).Width * 2
  178.     h = GradPan.Height - h1 - GradLab(0).Top
  179.     GradLab(1).Move w \ 3, h, GradLab(1).Width, h1
  180.     GradLab(2).Move GradPan.Width - GradLab(2).Width - w \ 3, h, GradLab(2).Width, h1
  181.     
  182.     If windowstate = 1 Then Exit Sub
  183.     DoEvents
  184.     ' bring em back...
  185.     For i = 0 To 2
  186.         GradLab(i).ClipCtl = GradPan.hCtl
  187.         GradLab(i).Visible = True
  188.     Next
  189.  
  190.     ' let the new labels paint before moving the transparent note
  191.     DoEvents
  192.     NoteLab.Move (ScaleWidth - NoteLab.Width) \ 2, GradLab(0).Top + GradLab(0).Height - NoteLab.Height
  193.     ' then clip out the note so it doesn't flash
  194.     NoteLab.ClipCtl = GradLab(0).hCtl
  195.     NoteLab.Visible = True
  196.  
  197.     PZdemo!Timer1.Enabled = True
  198. End Sub
  199.  
  200. Sub GradLab_Click (Index As Integer)
  201.     GradPan_Click
  202. End Sub
  203.  
  204. Sub GradPan_Click ()
  205.     If PZdemo!Timer1.Enabled Then Unload Me
  206. End Sub
  207.  
  208.