Re: Hiding all open forms
Mike Andrews <[email protected]> Tue, 27 Nov 2007 08:52:12 -0600
| Newsgroups | gmane.comp.windows.devel.dotnet.winforms |
|---|---|
| Message-ID | <[email protected]> |
Is the specific requirement that they all hide/show at once? Or is it that when the "close" they don't really close you just hide them for later use? Thanks, Mike On Nov 27, 2007 8:47 AM, James Berry <[email protected]> wrote: > I need to hide all open forms in my application (and be able to bring them > back later). This is a security function for which there is an external > requirement, and I can do nothing to manage. > > My first test was to use the Application.OpenForms to discover all open > forms and then hide them. This gives two sets of problems: > > 1. OpenForms does not include forms where ShowInTaskBar = false > 2. Hiding open dialog boxes causes them to close (returning DialogResult). > > So, any pointers? > > 1. Is there a way to identify all open forms without OpenForms (Win32 > functions to find the handles would be enough probably, as I can always send > messages rather than using the dotnet functions) > 2. Is there a good alternative to hiding? I thought of resizing to 0,0 - > or moving massively off screen (eg to 10000, 10000) > > Best wishes > James >