home *** CD-ROM | disk | FTP | other *** search
/ Hot Shareware 32 / hot34.iso / ficheros / LVB / T2W32523.ZIP / _GRAD.FRM < prev    next >
Text File  |  1998-04-07  |  7KB  |  231 lines

  1. VERSION 5.00
  2. Object = "{0BA686C6-F7D3-101A-993E-0000C0EF6F5E}#1.0#0"; "THREED32.OCX"
  3. Begin VB.Form frmGradient 
  4.    BorderStyle     =   4  'Fixed ToolWindow
  5.    Caption         =   "Gradient"
  6.    ClientHeight    =   4290
  7.    ClientLeft      =   1890
  8.    ClientTop       =   3270
  9.    ClientWidth     =   6855
  10.    MaxButton       =   0   'False
  11.    MDIChild        =   -1  'True
  12.    PaletteMode     =   1  'UseZOrder
  13.    ScaleHeight     =   4290
  14.    ScaleWidth      =   6855
  15.    ShowInTaskbar   =   0   'False
  16.    Begin Threed.SSPanel SSPanel1 
  17.       Align           =   1  'Align Top
  18.       Height          =   480
  19.       Left            =   0
  20.       TabIndex        =   0
  21.       Top             =   0
  22.       Width           =   6855
  23.       _Version        =   65536
  24.       _ExtentX        =   12091
  25.       _ExtentY        =   847
  26.       _StockProps     =   15
  27.       ForeColor       =   -2147483640
  28.       BackColor       =   12632256
  29.       BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  30.          Name            =   "MS Sans Serif"
  31.          Size            =   8.25
  32.          Charset         =   0
  33.          Weight          =   400
  34.          Underline       =   0   'False
  35.          Italic          =   0   'False
  36.          Strikethrough   =   0   'False
  37.       EndProperty
  38.       Begin VB.ComboBox cmb_Function 
  39.          Height          =   315
  40.          Left            =   1365
  41.          TabIndex        =   1
  42.          Top             =   90
  43.          Width           =   4245
  44.       End
  45.       Begin Threed.SSCommand cmdNP 
  46.          Height          =   300
  47.          Index           =   1
  48.          Left            =   6510
  49.          TabIndex        =   5
  50.          Top             =   90
  51.          Width           =   255
  52.          _Version        =   65536
  53.          _ExtentX        =   450
  54.          _ExtentY        =   529
  55.          _StockProps     =   78
  56.          Caption         =   ">"
  57.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  58.             Name            =   "MS Sans Serif"
  59.             Size            =   8.25
  60.             Charset         =   0
  61.             Weight          =   400
  62.             Underline       =   0   'False
  63.             Italic          =   0   'False
  64.             Strikethrough   =   0   'False
  65.          EndProperty
  66.          BevelWidth      =   1
  67.          Font3D          =   3
  68.          RoundedCorners  =   0   'False
  69.          Outline         =   0   'False
  70.       End
  71.       Begin Threed.SSCommand cmdNP 
  72.          Height          =   300
  73.          Index           =   0
  74.          Left            =   5670
  75.          TabIndex        =   4
  76.          Top             =   90
  77.          Width           =   255
  78.          _Version        =   65536
  79.          _ExtentX        =   450
  80.          _ExtentY        =   529
  81.          _StockProps     =   78
  82.          Caption         =   "<"
  83.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  84.             Name            =   "MS Sans Serif"
  85.             Size            =   8.25
  86.             Charset         =   0
  87.             Weight          =   400
  88.             Underline       =   0   'False
  89.             Italic          =   0   'False
  90.             Strikethrough   =   0   'False
  91.          EndProperty
  92.          BevelWidth      =   1
  93.          Font3D          =   3
  94.          RoundedCorners  =   0   'False
  95.          Outline         =   0   'False
  96.       End
  97.       Begin Threed.SSCommand SSCommand1 
  98.          Default         =   -1  'True
  99.          Height          =   300
  100.          Left            =   5985
  101.          TabIndex        =   2
  102.          Top             =   90
  103.          Visible         =   0   'False
  104.          Width           =   465
  105.          _Version        =   65536
  106.          _ExtentX        =   820
  107.          _ExtentY        =   529
  108.          _StockProps     =   78
  109.          Caption         =   "&Go"
  110.          BeginProperty Font {0BE35203-8F91-11CE-9DE3-00AA004BB851} 
  111.             Name            =   "MS Sans Serif"
  112.             Size            =   8.25
  113.             Charset         =   0
  114.             Weight          =   400
  115.             Underline       =   0   'False
  116.             Italic          =   0   'False
  117.             Strikethrough   =   0   'False
  118.          EndProperty
  119.          BevelWidth      =   1
  120.          RoundedCorners  =   0   'False
  121.          Outline         =   0   'False
  122.       End
  123.       Begin VB.Label Label2 
  124.          Caption         =   "&Select a function"
  125.          Height          =   255
  126.          Left            =   90
  127.          TabIndex        =   3
  128.          Top             =   120
  129.          Width           =   1275
  130.       End
  131.    End
  132. End
  133. Attribute VB_Name = "frmGradient"
  134. Attribute VB_GlobalNameSpace = False
  135. Attribute VB_Creatable = False
  136. Attribute VB_PredeclaredId = True
  137. Attribute VB_Exposed = False
  138. Option Explicit
  139. Option Base 1
  140.  
  141. Private Const Iteration = 250
  142.  
  143. Dim IsLoaded         As Integer
  144.  
  145. Dim TimerStartOk     As Integer
  146. Dim TimerCloseOk     As Integer
  147.  
  148. Dim TimerHandle      As Integer
  149. Dim TimerValue       As Long
  150.  
  151. Private Sub cmdNP_Click(Index As Integer)
  152.  
  153.    Call sub_NextPrev(cmb_Function, Index)
  154.  
  155. End Sub
  156.  
  157.  
  158. Private Sub cmb_Function_Click()
  159.    
  160.    If (IsLoaded = False) Then Exit Sub
  161.    
  162.    Call cDisableFI(mdiT2W.Picture1)
  163.    
  164.    DoEvents
  165.    
  166.    Select Case cmb_Function.ListIndex
  167.       Case 0 To 7
  168.          Refresh
  169.       Case 8
  170.          Call TestPsychedelic
  171.       Case Else
  172.    End Select
  173.  
  174.    DoEvents
  175.    Call cEnableFI(mdiT2W.Picture1)
  176.    
  177. End Sub
  178.  
  179. Private Sub Form_Activate()
  180.  
  181.    mdiT2W.Label2.Caption = cInsertBlocks(mdiT2W.Label2.Tag, "" & Iteration)
  182.  
  183. End Sub
  184.  
  185. Private Sub Form_Load()
  186.  
  187.    IsLoaded = False
  188.    
  189.    Show
  190.  
  191.    Call sub_Load_Combo(cmb_Function, T2WDirInst + "_grad.t2w")
  192.    
  193.    IsLoaded = True
  194.    
  195. End Sub
  196.  
  197. Private Sub Form_Paint()
  198.    Dim OldScaleMode        As Integer
  199.    OldScaleMode = Me.ScaleMode
  200.    Me.ScaleMode = 3
  201.    cGradient Me.hDC, 0, 0, Me.ScaleWidth, Me.ScaleHeight, cmb_Function.ListIndex + 1, 0, vbBlue
  202.    'cTitleGradient Me.hWnd, Me.Icon, cmb_Function.ListIndex + 1, 0, vbGreen
  203.    Me.ScaleMode = OldScaleMode
  204. End Sub
  205.  
  206. Private Sub SSCommand1_Click()
  207.    
  208.    Call cmb_Function_Click
  209.    
  210. End Sub
  211.  
  212. Private Sub TestPsychedelic()
  213.    
  214.    Dim OldScaleMode        As Integer
  215.    
  216.    OldScaleMode = Me.ScaleMode
  217.    Me.ScaleMode = 3
  218.      
  219.    Dim t             As Single
  220.    
  221.    t = Timer
  222.    
  223.    Do
  224.       cGradient Me.hDC, 0, 0, Me.ScaleWidth, Me.ScaleHeight, Int((8 * Rnd) + 1), 0, Int((&HFFFFFF * Rnd) + 1)
  225.       DoEvents
  226.    Loop Until ((Timer - t) > 4)
  227.    
  228.    Me.ScaleMode = OldScaleMode
  229.    
  230. End Sub
  231.