Example #1
0
        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"
        }
Example #2
0
        private static IntPtr GetSpotify()
        {
            var windowClassName = "Chrome_WidgetWin_0";
            var handle          = Win32.FindWindow(windowClassName, "Spotify");

            if (handle == IntPtr.Zero)
            {
                handle = GetSpotifyByProcess();
            }
            return(handle);
        }
Example #3
0
        private static IntPtr GetSpotify()
        {
            var windowClassName = "SpotifyMainWindow";

            return(Win32.FindWindow(windowClassName, null));
        }
Example #4
0
 private static IntPtr GetSpotify()
 {
     return(Win32.FindWindow("SpotifyMainWindow", null));
 }