Home Forums WinForms controls Other WinForms controls Can I close and dispose a ToolWindow?

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #18522 |

    The document says that “From the moment a tool window is created, it will always exist. If a tool window is closed using the “hide” button ( X ), it is not disposed of but rather hidden.”

    To save memory and accelerate the startup process, I do want to close and dispose the toolwindows that are closed by user. If there are a lot of toolwindows to be opened before calling LoadLayout, the startup process will be too long for users.

    Imported from legacy forums. Posted by Jinniu (had 2769 views)

    User (Old forums)
    Member
    Post count: 23064

    The DockLayoutManager must always have access to all the ToolWindows that can be manipulated by the user.  So what you could do is to remove the ToolWindow form the ToolWindows collection of the DockLayoutManager, and then call Dispose() on ToolWindow.

    Imported from legacy forums. Posted by André (had 2789 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.