Manipulating A Window Region And Using AnimateWindow

vis781

Well-known member
Joined
Aug 30, 2005
Messages
2,016
Location
Cambridge, UK
Programming Experience
5-10
Here's one for someone way smarter than me. So i have a window and i am adjusting the region of it to make it the shape i desire. I am also using the CS_DROPSHADOW style in the overriden createparams property to display a dropshadow. This all works fine until i come to use the animatewindow api to show the window... The dropshadow is drawn perfectly whilst the window is animating in and then it seems to be redrawn at the last minute to the window rectangle leaving the dropshadow seemingly drawn in the middle of nowher. It works flawlessly with the showwindow API but not with animatewindow. i can't figure out why this is happening. Does anyone have any idea on what message is being sent to the window at the last minute useing the AnimateWindow function that could be causing the window to ignore the region i have set.
 
Why don't you try seeing this one:
http://www.codeproject.com/vb/net/popup.asp
It goes about displaying any control(placed on a separate form) in popup mode. But it also uses CS_DROPSHADOW, and the animations seemed to work pretty well...
PS: If it works, I won't tell anyone I'm smarter than you :D
 
No it's ok, i solved the problem a while back, i had to get a graphics object directly from the window device context and set the region that way. Cheers anyway.
 
Back
Top