General information
Category:
Windows API functions
Title:
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.
Next
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only