private void setWindowTitle()
        {
            IMJPlaybackAutomation playback = mcRef.GetPlayback();

            if (playback.State != MJPlaybackStates.PLAYSTATE_STOPPED && displayArtistTrackName.Checked)
            {
                Windows7Taskbar.SetThumbnailTooltip((IntPtr)mcRef.GetWindowHandle(), nowPlayingFile.Artist + " - " + nowPlayingFile.Name);
                SetWindowText((IntPtr)mcRef.GetWindowHandle(), nowPlayingFile.Artist + " - " + nowPlayingFile.Name);
            }
            else
            {
                SetWindowText((IntPtr)mcRef.GetWindowHandle(), oldWindowText.ToString());
                Windows7Taskbar.SetThumbnailTooltip((IntPtr)mcRef.GetWindowHandle(), oldWindowText.ToString());
            }
        }
Пример #2
0
 /// <summary>
 /// Sets the specified form's thumbnail tooltip.
 /// </summary>
 /// <param name="form">The form.</param>
 /// <param name="tooltip">The tooltip text.</param>
 public static void SetThumbnailTooltip(this Form form, string tooltip)
 {
     Windows7Taskbar.SetThumbnailTooltip(form.Handle, tooltip);
 }
Пример #3
0
 /// <summary>
 /// Sets the specified form's thumbnail tooltip.
 /// </summary>
 /// <param name="form">The form.</param>
 /// <param name="tooltip">The tooltip text.</param>
 public static void SetThumbnailTooltip(this Window form, string tooltip)
 {
     Windows7Taskbar.SetThumbnailTooltip(GetWindowHandle(form), tooltip);
 }