home *** CD-ROM | disk | FTP | other *** search
/ DP Tool Club 16 / CD_ASCQ_16_0994.iso / news / 4611 / fw16d.ins / SAMPLES / TESTICO.PRG < prev    next >
Text File  |  1994-01-16  |  1KB  |  49 lines

  1. #include "FiveWin.ch"
  2.  
  3. static oWnd
  4.  
  5. //----------------------------------------------------------------------------//
  6.  
  7. function Main()
  8.  
  9.    local oBrush
  10.  
  11.    SET RESOURCES TO "Animatio.dll"
  12.  
  13.    DEFINE BRUSH oBrush STYLE TILED
  14.  
  15.    DEFINE WINDOW oWnd FROM 1, 1 TO 20, 60 ;
  16.       TITLE "Icons & Timers" BRUSH oBrush
  17.  
  18.    SET MESSAGE OF oWnd ;
  19.       TO OemToAnsi( "FiveWin 1.2 - (c) A.Linares & F.Pulpón, 1993" )
  20.  
  21.    ACTIVATE WINDOW oWnd ;
  22.       ON INIT DisplayIcons()
  23.  
  24.    SET RESOURCES TO
  25.  
  26. return
  27.  
  28. //----------------------------------------------------------------------------//
  29.  
  30. function DisplayIcons()
  31.  
  32.    local oIco
  33.    local oTimer
  34.  
  35.    static nFrame := 1
  36.  
  37.    @ 2, 2 ICON oIco RESOURCE "Icon1" OF oWnd
  38.  
  39.    DEFINE TIMER oTimer OF oWnd ;
  40.       INTERVAL 300 ;
  41.       ACTION ( nFrame++, nFrame := If( nFrame > 20, 1, nFrame ),;
  42.                oIco:SetName( "Icon" + AllTrim( Str( nFrame ) ) ) )
  43.  
  44.    ACTIVATE TIMER oTimer
  45.  
  46. return
  47.  
  48. //----------------------------------------------------------------------------//
  49.