home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 35 / hot35.iso / ficheros / LVB / T2W32543.ZIP / _GRAD.FRM < prev    next >
Text File  |  1998-05-21  |  4KB  |  163 lines

  1. VERSION 5.00
  2. Begin VB.Form frmGradient 
  3.    BorderStyle     =   4  'Fixed ToolWindow
  4.    Caption         =   "Gradient"
  5.    ClientHeight    =   4290
  6.    ClientLeft      =   1890
  7.    ClientTop       =   3270
  8.    ClientWidth     =   6600
  9.    MaxButton       =   0   'False
  10.    MDIChild        =   -1  'True
  11.    PaletteMode     =   1  'UseZOrder
  12.    ScaleHeight     =   4290
  13.    ScaleWidth      =   6600
  14.    ShowInTaskbar   =   0   'False
  15.    Begin VB.Frame Frame1 
  16.       Height          =   570
  17.       Left            =   0
  18.       TabIndex        =   0
  19.       Top             =   -90
  20.       Width           =   6585
  21.       Begin VB.CommandButton cmdNP 
  22.          Caption         =   ">"
  23.          Height          =   285
  24.          Index           =   1
  25.          Left            =   6210
  26.          TabIndex        =   5
  27.          Top             =   195
  28.          Width           =   285
  29.       End
  30.       Begin VB.CommandButton cmdNP 
  31.          Caption         =   "<"
  32.          Height          =   285
  33.          Index           =   0
  34.          Left            =   5310
  35.          TabIndex        =   4
  36.          Top             =   195
  37.          Width           =   285
  38.       End
  39.       Begin VB.CommandButton Command1 
  40.          Caption         =   "&Go"
  41.          Default         =   -1  'True
  42.          Height          =   285
  43.          Left            =   5670
  44.          TabIndex        =   3
  45.          Top             =   195
  46.          Width           =   465
  47.       End
  48.       Begin VB.ComboBox cmb_Function 
  49.          Height          =   315
  50.          Left            =   1365
  51.          TabIndex        =   1
  52.          Top             =   180
  53.          Width           =   3855
  54.       End
  55.       Begin VB.Label Label2 
  56.          Caption         =   "&Select a function"
  57.          Height          =   255
  58.          Left            =   90
  59.          TabIndex        =   2
  60.          Top             =   210
  61.          Width           =   1275
  62.       End
  63.    End
  64. End
  65. Attribute VB_Name = "frmGradient"
  66. Attribute VB_GlobalNameSpace = False
  67. Attribute VB_Creatable = False
  68. Attribute VB_PredeclaredId = True
  69. Attribute VB_Exposed = False
  70. Option Explicit
  71. Option Base 1
  72.  
  73. Private Const Iteration = 250
  74.  
  75. Dim IsLoaded         As Integer
  76.  
  77. Dim TimerStartOk     As Integer
  78. Dim TimerCloseOk     As Integer
  79.  
  80. Dim TimerHandle      As Integer
  81. Dim TimerValue       As Long
  82.  
  83. Private Sub cmdNP_Click(Index As Integer)
  84.  
  85.    Call sub_NextPrev(cmb_Function, Index)
  86.  
  87. End Sub
  88.  
  89.  
  90. Private Sub cmb_Function_Click()
  91.    
  92.    If (IsLoaded = False) Then Exit Sub
  93.    
  94.    Call cDisableFI(mdiT2W.Picture1)
  95.    
  96.    DoEvents
  97.    
  98.    Select Case cmb_Function.ListIndex
  99.       Case 0 To 7
  100.          Refresh
  101.       Case 8
  102.          Call TestPsychedelic
  103.       Case Else
  104.    End Select
  105.  
  106.    DoEvents
  107.    Call cEnableFI(mdiT2W.Picture1)
  108.    
  109. End Sub
  110.  
  111. Private Sub Form_Activate()
  112.  
  113.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  114.  
  115. End Sub
  116.  
  117. Private Sub Form_Load()
  118.  
  119.    IsLoaded = False
  120.    
  121.    Show
  122.  
  123.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_grad.t2w")
  124.    
  125.    IsLoaded = True
  126.    
  127. End Sub
  128.  
  129. Private Sub Form_Paint()
  130.    Dim OldScaleMode        As Integer
  131.    OldScaleMode = Me.ScaleMode
  132.    Me.ScaleMode = 3
  133.    cGradient Me.hDC, 0, 0, Me.ScaleWidth, Me.ScaleHeight, cmb_Function.ListIndex + 1, 0, vbBlue
  134.    'cTitleGradient Me.hWnd, Me.Icon, cmb_Function.ListIndex + 1, 0, vbGreen
  135.    Me.ScaleMode = OldScaleMode
  136. End Sub
  137.  
  138. Private Sub Command1_Click()
  139.    
  140.    Call cmb_Function_Click
  141.    
  142. End Sub
  143.  
  144. Private Sub TestPsychedelic()
  145.    
  146.    Dim OldScaleMode        As Integer
  147.    
  148.    OldScaleMode = Me.ScaleMode
  149.    Me.ScaleMode = 3
  150.      
  151.    Dim t             As Single
  152.    
  153.    t = Timer
  154.    
  155.    Do
  156.       cGradient Me.hDC, 0, 0, Me.ScaleWidth, Me.ScaleHeight, Int((8 * Rnd) + 1), 0, Int((&HFFFFFF * Rnd) + 1)
  157.       DoEvents
  158.    Loop Until ((Timer - t) > 4)
  159.    
  160.    Me.ScaleMode = OldScaleMode
  161.    
  162. End Sub
  163.