Drop Shadow On A Borderless WinForm

后端 未结 5 1952
暖寄归人
暖寄归人 2020-12-08 05:38

I\'m trying to drop a shadow around the whole form just like the first picture, except that that is a WPF, not a WinForm. now I want to drop the same shadow on a winform.

5条回答
  •  天涯浪人
    2020-12-08 06:15

    As far as I know, there is no direct way of doing this in WinForms.

    Instead, you can follow this step by step:

    1) Create an image having the desired drop shadow using photoshop or any other tool.
    2) Use this image as background image of your form.
    3) Set FormBorderStyle property of the form to None.
    4) You are done!
    5) Note: Make sure to save the image in proper format(such as png) so that the drop shadow effect could work.

提交回复
热议问题