Currently, I'm trying to have a top-level window in Windows Forms with a custom frame (using DevExpress' SkinManager.EnableFormSkins
function) and still have a shadow around the window, when running on Windows 7 Aero.
The window currently looks like this:
and I want it to look like this:
(I.e. have a soft shadow around the window).
I did a lot of research and try-and-error, including using CS_DROPSHADOW
, asking the DevExpress support, reading on SO, other blogs and MSDN documentation.
Still, nothing brings a shadow to my window.
Although I think that my requirement simply is not possible to achieve, I still want to take the chance and ask here on SO.
(I even thought of faking this by having a native Aero window behind my actual window but failed to implement...)
My question is:
Is it possible to have a window with a custom-drawn non-client (NC) area and still get a shadow around this window when Aero is active?
To summarize and close my own question, after much of an effort, I do think this is simply not possible.
What I achieved is to simulate a shadow by using the technique being used in the Locus Effects article.
Basically use a transparent window, dynamically use alpha blending PNGs as simulated shadow and draw that around the sides (and corners) of the window; move the transparent window, when the real window moves, etc.
This works well, but still looks kind of unprofessional to the user, because of small things like shadow disapears when other window is being activated not behaving as expected.
So my conclusion is: Not possible with a reasonable effort.