Microsoft.WindowsAPICodePack.Taskbar.TaskbarWindow.Dispose C# (CSharp) Method

Dispose() public method

Release the native objects.
public Dispose ( ) : void
return void
        public void Dispose()
        {
            Dispose(true);
            GC.SuppressFinalize(this);
        }

Same methods

TaskbarWindow::Dispose ( bool disposing ) : void

Usage Example

        private static bool DispatchSystemCommandMessage(ref System.Windows.Forms.Message m, TaskbarWindow taskbarWindow)
        {
            if (m.Msg == (int)WindowMessage.SystemCommand)
            {
                if (((int)m.WParam) == TabbedThumbnailNativeMethods.ScClose)
                {
                    // Raise the event
                    if (taskbarWindow.TabbedThumbnail.OnTabbedThumbnailClosed())
                    {
                        // Remove the taskbar window from our internal list
                        if (_taskbarWindowList.Contains(taskbarWindow))
                        {
                            _taskbarWindowList.Remove(taskbarWindow);
                        }

                        taskbarWindow.Dispose();
                        taskbarWindow = null;
                    }
                }
                else if (((int)m.WParam) == TabbedThumbnailNativeMethods.ScMaximize)
                {
                    // Raise the event
                    taskbarWindow.TabbedThumbnail.OnTabbedThumbnailMaximized();
                }
                else if (((int)m.WParam) == TabbedThumbnailNativeMethods.ScMinimize)
                {
                    // Raise the event
                    taskbarWindow.TabbedThumbnail.OnTabbedThumbnailMinimized();
                }

                return(true);
            }
            return(false);
        }
All Usage Examples Of Microsoft.WindowsAPICodePack.Taskbar.TaskbarWindow::Dispose