Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Niffty trick of the day...
Message
De
21/07/2000 09:23:17
 
 
À
20/07/2000 17:21:02
Information générale
Forum:
Visual FoxPro
Catégorie:
Fonctions Windows API
Divers
Thread ID:
00395124
Message ID:
00395365
Vues:
11
Cool! Another example of why I love hanging out here!
Thanks Robert,
-Isaac


>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.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform