Updating UI in C# using Timer

后端 未结 4 1144
孤独总比滥情好
孤独总比滥情好 2020-12-02 02:56

I am working on making my application that reads data from the serial port and updates a gauge on the UI more efficient and I wanted to ask for some advice on my code that

4条回答
  •  余生分开走
    2020-12-02 03:36

    Looks like you're doing this in Windows Forms? Use:

    Graphics.RotateTransform

    If I may humbly suggest, though, if you're trying to do anything even remotely interesting graphically, it may be worth the investment to step up to WPF. Windows Forms relies on the old GDI apis which are not hardware accelerated (unlike WPF which is built on DirectX), making it a poor platform for any kind of serious graphics. No matter how 'efficient' you get with winforms, you'll never be able to compete with anything that's backed by hardware acceleration.

提交回复
热议问题