Here are the examples of the csharp api class System.Windows.Forms.Form.OnHandleDestroyed(System.EventArgs) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.
2 Examples
0
1. Example
Project: sharpshell
Source File: FileDialog.cs
Source File: FileDialog.cs
protected override void OnHandleDestroyed(EventArgs e) { m_pidlAbsCurrent = IntPtr.Zero; m_selectedPidls = null; // Release the IShellView if (m_shellView != null) { if (m_restoreLastViewMode) { // Saves the view mode if the RestoreLastViewMode property is set to true NativeMethods.FOLDERSETTINGS fs = new NativeMethods.FOLDERSETTINGS(); m_shellView.GetCurrentInfo(ref fs); m_viewMode = (FileDialogViewMode)fs.ViewMode; } m_shellView.UIActivate((uint)NativeMethods.SVUIA_STATUS.SVUIA_DEACTIVATE); m_shellView.DestroyViewWindow(); Marshal.ReleaseComObject(m_shellView); m_shellView = null; } m_backItemsOverflow.Clear(); backToolStripSplitButton.DropDownItems.Clear(); backToolStripSplitButton.Enabled = false; base.OnHandleDestroyed(e); }
0
2. Example
Project: sharpshell
Source File: ShellDebuggerForm.cs
Source File: ShellDebuggerForm.cs
protected override void OnHandleDestroyed(EventArgs e) { currentAbsolutePidl = IntPtr.Zero; // Release the IShellView if (shellView != null) { shellView.UIActivate((uint)SVUIA_STATUS.SVUIA_DEACTIVATE); shellView.DestroyViewWindow(); // The shell view may have come from COM but may be a SharpShell view, so check if it's COM // before we release it. if(Marshal.IsComObject(shellView)) Marshal.ReleaseComObject(shellView); shellView = null; } base.OnHandleDestroyed(e); }