Windows Animation

Windows Animation

Postby devtuxtla » Sun Mar 26, 2017 11:10 pm

Hi Fivewinners.

Since the version of xHarbour 0.99 I have used this code to randomly animate the beginning and end of each window, however with the version of xHarbour 1.2.3. (Build 20161218) and Bc7 sends me in error 9003.
With this last version of xHarbour that changes in the call of this API?

Code: Select all  Expand view


ACTIVATE DIALOG oPD CENTERED ON INIT NW_ANIMA( oPD )  ;
                    Valid( Fade( oPD ), .T. )

*--------------------------------------------------------------*
FUNCTION NW_ANIMA( oDlg )
*--------------------------------------------------------------*
LOCAL nSel:= nRandom(6)
LOCAL cAni:= ""

IF nSel == 1
   //a) desde la esquina inferior izquierda hasta la esquina superior derecha:
   cAni:= AW_VER_NEGATIVE + AW_HOR_POSITIVE + AW_SLIDE + AW_ACTIVATE
ELSEIF nSel == 2
   //b) desde la esquina inferior derecha hasta la esquina superior izquierda:
   cAni:= AW_HOR_NEGATIVE + AW_VER_NEGATIVE + AW_SLIDE + AW_ACTIVATE
ELSEIF nSel == 3
   //c) desde la esquina superior derecha hasta la esquina inferior izquierda:
   cAni:= AW_HOR_NEGATIVE + AW_VER_POSITIVE + AW_SLIDE + AW_ACTIVATE
ELSEIF nSel == 4
   //d) Aparecer desplazandose de izquierda a derecha
   cAni:= AW_HOR_POSITIVE + AW_SLIDE + AW_ACTIVATE
ELSEIF nSel == 5
   //e) desde la esquina superior izquierda hasta la esquina inferior derecha:
   cAni:= AW_HOR_POSITIVE + AW_VER_POSITIVE + AW_SLIDE + AW_ACTIVATE
ELSEIF nSel == 6
   //f) aparecer desde el centro:
   cAni:= AW_CENTER + AW_SLIDE + AW_ACTIVATE
ELSEIF nSel == 0
   cAni:= AW_BLEND
ENDIF
 
AnimateWindow( oDlg:hWnd, 500, cAni )
 
oDlg:Refresh()

RETURN 0


DLL32 FUNCTION AnimateWindow( hWnd As LONG, dwTime As LONG, dwFlags As LONG ) AS LONG PASCAL ;
               from "AnimateWindow" lib "user32.DLL"


*--------------------------------------------------------------*
FUNCTION fade( oDlg, oWner )
*--------------------------------------------------------------*
LOCAL nSel:= nRandom(6)
LOCAL cAni:= AW_VER_NEGATIVE + AW_HOR_POSITIVE + AW_SLIDE + AW_HIDE

IF nSel == 1
   //a) desde la esquina inferior izquierda hasta la esquina superior derecha:
   cAni:= AW_VER_NEGATIVE + AW_HOR_POSITIVE + AW_SLIDE + AW_HIDE
ELSEIF nSel == 2
   //b) desde la esquina inferior derecha hasta la esquina superior izquierda:
   cAni:= AW_HOR_NEGATIVE + AW_VER_NEGATIVE + AW_SLIDE + AW_HIDE
ELSEIF nSel == 3
   //c) desde la esquina superior derecha hasta la esquina inferior izquierda:
   cAni:= AW_HOR_NEGATIVE + AW_VER_POSITIVE + AW_SLIDE + AW_HIDE
ELSEIF nSel == 4
   //d) Aparecer desplazandose de izquierda a derecha
   cAni:= AW_HOR_POSITIVE + AW_SLIDE + AW_HIDE
ELSEIF nSel == 5
   //e) desde la esquina superior izquierda hasta la esquina inferior derecha:
   cAni:= AW_HOR_POSITIVE + AW_VER_POSITIVE + AW_SLIDE + AW_HIDE
ELSEIF nSel == 6
   //f) aparecer desde el centro:
   cAni:= AW_CENTER + AW_SLIDE + AW_HIDE
//ELSEIF nSel == 0
//   cAni:= AW_BLEND + AW_HIDE
ENDIF

AnimateWindow( oDlg : hWnd, 500, cAni )
oDlg : Hide()
AnimateWindow( oDlg : hWnd, 500, AW_BLEND + AW_SLIDE + AW_ACTIVATE + AW_HIDE)
IF !EMPTY(oWner)
   //AnimateWindow( oDlg : hWnd, 500, AW_BLEND + AW_SLIDE + AW_ACTIVATE+AW_HIDE)
   //oWner : show()
   oWner : setcontrol()
   oWner : setfocus()
ENDIF

RETURN 0
 
Visite Chiapas, el paraiso de México.
devtuxtla
 
Posts: 392
Joined: Tue Jul 29, 2008 1:55 pm

Re: Windows Animation

Postby nageswaragunupudi » Mon Mar 27, 2017 2:08 am

With xHarbour build 20151110, i do not get any errors and also with Harbour
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
 
Posts: 10471
Joined: Sun Nov 19, 2006 5:22 am
Location: India

Re: Windows Animation

Postby devtuxtla » Wed Mar 29, 2017 3:24 am

Hi Nages.

To solve this problem the DLL's gave a step back ...

I generated the application with the version of FWH17.02, xHarbour 1.2.3. (Build 20161218) and BCC 7.0

And problem solved ... DLL's methods run well ...

Maybe it is necessary to wait a little before using BCC 7.2, although I do not know if that is the cause of the problem.

regards
Visite Chiapas, el paraiso de México.
devtuxtla
 
Posts: 392
Joined: Tue Jul 29, 2008 1:55 pm


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 96 guests

cron