Fade or remove the DropShadow

G

Guest

I've created a form and added the following code in the CreateParams property
to display a drop shadow on the form.

protected override CreateParams CreateParams
{
get
{
CreateParams parameters = base.CreateParams;

parameters.ClassStyle = (parameters.ClassStyle | CS_DROPSHADOW);

return parameters;
}
}

I've then added some code to make the form look like it is fading out by
decreasing the forms Opacity property to 0 with a timer. The problem is that
the Shadow doesn't fade and it doesn't look very good.

Is there any way to fade the drop shadow, or anyway to get rid of the drop
shadow after the window has been created?

Thank you for your help
 
N

Nicholas Paldino [.NET/C# MVP]

Mark,

There isn't much you can do in this situation. You can't change a
window style once you have created the window, and I imagine that the same
applies for the style of a class of window (which is what you are modifying,
not the window style). The only way to shut it off is if you do it
system-wide, and that's not a good idea either.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top