Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Niffty trick of the day...
Message
From
21/07/2000 09:23:17
 
 
To
20/07/2000 17:21:02
General information
Forum:
Visual FoxPro
Category:
Windows API functions
Miscellaneous
Thread ID:
00395124
Message ID:
00395365
Views:
10
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.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform