Special effects for dialogs

Post Reply
horacio
Posts: 1270
Joined: Wed Jun 21, 2006 12:39 am
Location: Capital Federal Argentina

Special effects for dialogs

Post by horacio »

I hope that they like

#include 'fivewin.ch'
#define AW_HOR_POSITIVE 1 // Animates the window from left to right. This flag can be used with roll or slide animation.
#define AW_HOR_NEGATIVE 2 // Animates the window from right to left. This flag can be used with roll or slide animation.
#define AW_VER_POSITIVE 4 // Animates the window from top to bottom. This flag can be used with roll or slide animation.
#define AW_VER_NEGATIVE 8 // Animates the window from bottom to top. This flag can be used with roll or slide animation.
#define AW_CENTER 16 // Makes the window appear to collapse inward if AW_HIDE is used or expand outward if the AW_HIDE is not used.
#define AW_HIDE 65536 // Hides the window. By default, the window is shown.
#define AW_ACTIVATE 131072 // Activates the window.
#define AW_SLIDE 262144 // Uses slide animation. By default, roll animation is used.
#define AW_BLEND 524288 // Uses a fade effect. This flag can be used only if hwnd is a top-level window.

Function Main()

Local oDlg
Local oBtn
Define Dialog oDlg From 10, 10 To 300, 500 Pixel

@ 10, 10 Button oBtn Size 50, 10 Of oDlg Pixel Action oDlg : End()

Activate Dialog oDlg On Init Centra( oDlg ) Centered Valid( Fade( oDlg ), .t. )
Return 0


Function fade( oDlg )

If( AnimateWindow( oDlg : hWnd, 1000, AW_BLEND + AW_HIDE ) == 0 )
oDlg : Hide()
endif
Return 0
Function Centra( oDlg )

AnimateWindow( oDlg : hWnd, 200, AW_CENTER )
Return 0


DLL32 function AnimateWindow( hWnd As LONG, dwTime As LONG, dwFlags As LONG ) AS LONG PASCAL ;
from "AnimateWindow" lib "user32.DLL"
ask
Posts: 99
Joined: Wed Nov 02, 2005 10:40 am

Post by ask »

this is great stuff!!
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Post by nageswaragunupudi »

The earlier discussion on this topic may also give useful information

http://fivetechsoft.com/forums/viewtopi ... matewindow
Regards

G. N. Rao.
Hyderabad, India
Post Reply