I want to move a bitmap across a dialog, but it is really slow, how can I speed up the moving, maybe will be to code some thing in C
some help?
regards
Marcelo
- Code: Select all Expand view
#include "fivewin.ch"
FUNCTION main()
LOCAL oDlg, oBmp, i := 0, oTimer
DEFINE DIALOG oDlg FROM 10,10 TO 600,1000 PIXEL TRANSPARENT
@ 10,10 BITMAP oSprite FILE "face.bmp" OF oDlg PIXEL SIZE 20,20 TRANSPARENT NOBORDER
@ 100,10 button "MOVER" of odlg action oTimer:activate() PIXEL
DEFINE TIMER oTimer;
INTERVAL 0;
ACTION move( oSprite, @i, oTimer )
ACTIVATE DIALOG oDlg ON INIT oTimer:hWndOwner := oDlg:hWnd
RETURN NIL
FUNCTION move( oSprite, i, oTimer )
i += 5
oSprite:move( 10 + i, 10 + i )
IF i > 400
oTimer:deactivate()
ENDIF
RETURN NIL