/RefreshRateWpf

A small example WPF app that shows how to call into clumsy Win32 APIs detect the window's monitor and refresh rate. Should also work easily for WinForms and UWP.

Primary LanguageC#

RefreshRateWpf

A small example WPF app that shows how to call into clumsy Win32 APIs detect the window's monitor and refresh rate. Should also work easily for WinForms and UWP, or even MFC. As long as you can get an HWND you should be able to do this.

See MainWindow.xaml.cs for the important bits of code.

This code goes along with this blog post: https://blog.getpaint.net/2017/08/12/win32-how-to-get-the-refresh-rate-for-a-window/