/// <summary> /// Attaches a <see cref="IMessageFilter"/> to current <see cref="Application"/> /// to intercept window messages. /// </summary> /// <remarks> /// This method must be called before calling <see cref="Application.Run(Form)"/>. /// </remarks> /// <exception cref="InvalidOperationException">If an instance is attached before.</exception> public static void Attach() { if (!Win32.IsWindows7) { return; } if (instance == null) { instance = new TaskBarExtensions(); Application.AddMessageFilter(instance); } else { throw new InvalidOperationException("TaskBarExtensions already attached to current Application."); } }
protected override void Update() { TaskBarExtensions.UpdateThumbnailBarButton(this); }