コード例 #1
0
ファイル: Spotify.cs プロジェクト: Bironsaint/toastify
        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"
        }
コード例 #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);
        }
コード例 #3
0
ファイル: Spotify.cs プロジェクト: xorguy/Toastify
        private static IntPtr GetSpotify()
        {
            var windowClassName = "SpotifyMainWindow";

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