private static IntPtr GetSpotify() { // Since version "1.0.75.483" the class of the main windows has been changed . // var windowClassName = "SpotifyMainWindow"; var windowClassName = "Chrome_WidgetWin_0"; // "SpotifyMainWindow"; return(Win32.FindWindow(windowClassName, "Spotify")); // We need to filter for only windows with the name "spotify" }
private static IntPtr GetSpotify() { var windowClassName = "Chrome_WidgetWin_0"; var handle = Win32.FindWindow(windowClassName, "Spotify"); if (handle == IntPtr.Zero) { handle = GetSpotifyByProcess(); } return(handle); }
private static IntPtr GetSpotify() { var windowClassName = "SpotifyMainWindow"; return(Win32.FindWindow(windowClassName, null)); }
private static IntPtr GetSpotify() { return(Win32.FindWindow("SpotifyMainWindow", null)); }