How to avoid shadow in ToolTips?

2019-07-13 02:48发布

问题:

I have developed a control for ToolTip and registered it as ToolTip with below codes,

protected override CreateParams CreateParams
{
   get
   {
       CreateParams param = base.CreateParams;
       param.ClassName = "tooltips_class32";
       param.Style = unchecked(WindowMessages.WS_POPUP) | WindowMessages.TTS_ALWAYSTIP;
       param.ExStyle |= WindowMessages.WS_EX_TOPMOST;
       return param;
   }
}

By default, the tooltip popup is enabled with Shadow.

How can i disable the default shadow of the ToolTip?

Regards,

回答1:

Try to remove CS_DROPSHADOW flag from ClassStyle:

int CS_DROPSHADOW = 0x00020000;

{
    ...
    param.ClassStyle &= ~CS_DROPSHADOW;
    ...
}