Fading out an image with transparency in WinForms UI (.NET3.5)

后端 未结 2 397
猫巷女王i
猫巷女王i 2021-01-02 18:17

The application: I am writing a little game that would teach the user to read music notes. The game play is very simple. The app displayes a note and my lit

2条回答
  •  一个人的身影
    2021-01-02 18:45

    In WinForms you'd need to use timers or something to animate the opacity of the OK or FAILED control to make it fade out, or do something similar using GDI+ to draw it manually.

    If you're using .NET 3.5 anyway, I'd recommend using WPF, which is much easier for doing that sort of thing.

    As an example, you can have a look at Scott Hanselman's Baby Smash app, which is open source and has a similar concept of fading things in and out.

提交回复
热议问题