Information générale
Catégorie:
Fonctions Windows API
Titre:
Niffty trick of the day...
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
Voir le fil de ce thread
Voir le fil de ce thread à partir de ce message seulement
Voir tous les messages de ce thread
Voir tous les messages de ce thread à partir de ce message seulement