Anti-Aliased Text in a Transparent .NET Form

后端 未结 2 606
孤独总比滥情好
孤独总比滥情好 2021-01-02 09:44

I have a C# application which shows the current time in a transparent .NET Form. The Form has no controls and no border. Its property TransparencyKey is set to the Form\'s

2条回答
  •  爱一瞬间的悲伤
    2021-01-02 10:16

    In your Display_Paint method, try this:

    this.SetStyle(ControlStyles.DoubleBuffer | 
          ControlStyles.UserPaint | 
          ControlStyles.AllPaintingInWmPaint,
          true);
    this.UpdateStyles();
    

提交回复
热议问题