Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Niffty trick of the day...
Message
De
20/07/2000 17:21:02
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Titre:
Niffty trick of the day...
Divers
Thread ID:
00395124
Message ID:
00395124
Vues:
40
Here is a little trick to make your forms appear to slide from a icon or mouse click area to a full window.

DECLARE Integer DrawAnimatedRects IN USER32.dll Integer, Integer, String @, String @
DECLARE Integer SetRect IN User32.dll String @, Integer, Integer, Integer, Integer
DECLARE Integer GetActiveWindow IN USER32.dll

*---------------------------------------------------------------------
lc_FromRect = SPACE(16)
lc_ToRect = SPACE(16)

SetRect(@lc_FromRect, 10, 10, 10, 10)
SetRect(@lc_ToRect, 200, 200, 800, 500)

DrawAnimatedRects(GetActiveWindow(), 3, @lc_FromRect, @lc_ToRect)

*---------------------------------------------------------------------
If you want to draw from the mouse position, use this.
*---------------------------------------------------------------------

DECLARE Integer GetCursorPos IN user32.dll String @
lc_buffer = SPACE(8)

GetCursorPos(@lc_buffer)

lc_FromRect = lc_buffer + lc_buffer
DrawAnimatedRects(GetActiveWindow(), 3, @lc_FromRect, @lc_ToRect)

*---------------------------------------------------------------------

Well, thats it for today. Have fun.

Rob.
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform