Function Animate(cResource)
local oDlg,lOk
DEFINE DIALOG oDlg FROM 10, 20 TO 18, 65 TITLE "Testing Animation"
@ 3.5, 2 BUTTON "&Ok" OF oDlg SIZE 35, 12 ACTION ( oDlg:End, lOk := .t. ) DEFAULT
ACTIVATE DIALOG oDlg CENTERED ON INIT Startup(oDlg,cResource)
return nil
Function Startup(oDlg,cResource)
local oTmr,oBmp,nFrames,nFrameWidth
@ 2, 20 BITMAP oBmp RESOURCE cResource SIZE 0,0 PIXEL OF oDlg NOBORDER
oBmp:SetColor(GetSysColor( COLOR_BTNFACE ),GetSysColor( COLOR_BTNFACE ))
nFrames := val(right(cResource,2))
nFrameWidth := oBmp:nWidth()/nFrames
oBmp:lTransparent = .t.
MoveWindow(oBmp:hWnd,2,20,nFrameWidth,oBmp:nHeight())
DEFINE TIMER oTmr OF oDlg ;
INTERVAL 70 ACTION ( If( oBmp:nY < -oBmp:nWidth() + nFrameWidth*2,oBmp:nY := 0,;
oBmp:nY -= nFrameWidth ), oBmp:Refresh( .f. ) )
ACTIVATE TIMER oTmr
return nil
#include "fivewin.ch"
#include "banner.ch"
function main()
Local oDlg, oBanner
Local aPasos := { { PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 },;
{ PONER, 0 } }
DEFINE DIALOG oDlg NAME "DIALOG_1" COLOR CLR_BLACK, CLR_WHITE
REDEFINE BANNER oBanner ID 101 OF oDlg ;
BITMAPS "BMPS\A_1.bmp" ,;
"BMPS\A_2.bmp" ,;
"BMPS\A_3.bmp" ,;
"BMPS\A_4.bmp" ,;
"BMPS\A_5.bmp" ,;
"BMPS\A_6.bmp" ,;
"BMPS\A_7.bmp" ,;
"BMPS\A_8.bmp" ,;
"BMPS\A_9.bmp" ,;
"BMPS\A_10.bmp" ,;
"BMPS\A_11.bmp" ,;
"BMPS\A_12.bmp" ,;
"BMPS\A_13.bmp" ,;
"BMPS\A_14.bmp" ,;
"BMPS\A_15.bmp" ,;
"BMPS\A_16.bmp" ;
SPEED 0.05 ;
EFECTS aPasos ;
FRAMES 1
ACTIVATE DIALOG oDlg CENTERED
return nil
ukoenig wrote:before creating something new like classes .....
I try using existing functions / or parts of other solutions / samples to solve a problem
scooping all possibilities the basic-FWH offers
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: No registered users and 86 guests