Hi Jimmy,<br>Thanks for the note!<br><br>I was thinking more about this last night - the app is a legacy thing I've taken over, where the modal selection dialog is quite a heavy-weight entity - it captures about the same amount of real estate as the underlying application itself, with a dozen or more controls on it, and the user may be fooling around with it for 4 or 5 minutes at a stretch. We've concluded that it should really just present as a separate page on the app, rather than as a modal dialog, and probably next release we'll be moving toward that; it solves a stack of other interesting problems as well.<br>
<br>For the time being, we are trying to get to a point where someone may have not finished messing with the selection dialog, and wants to just minimize the whole thing (selection and main app window) in order to move to another app. The 'other app' may be another copy of this one, just running on a different data store, thus the need to get rid of (minimize completely) the 1st copy to avoid confusion! Obviously, when we move to a single window design this problem goes away; right now just trying to get the two windows in the app (if the selection dialog is active) to act "in unison".<br>
<br>In answer to your question, without any event handlers in place, I can minimize the selection dialog using the standard Windows "_" control, which leaves the main app window in view, but totally disabled - minimize, exit, etc. are disabled along with any of the app's controls. Taskbar still had two icons, one for the dialog and one for the main app, and I could restore the dialog and continue.<br>
<br>When I added in an event handler, both the selection and main app windows disappeared, with the modal dialog apparently completely gone (no taskbar icon any more) and the underlying app still waiting for it, so it's taksbar icon was completely disabled, unable to restore, cancel, anything.<br>
<br>Hope to get this to work in some fashion, but as I said, I'm going to be turning this into a separate page for a single app at some point so I may find some interim not-quite-what-they-want solution if this turns out to be too much effort to get going.<br>
Ken<br><br><div class="gmail_quote">On Tue, Apr 6, 2010 at 3:56 AM, Jimmy Schementi <span dir="ltr"><<a href="mailto:Jimmy.Schementi@microsoft.com">Jimmy.Schementi@microsoft.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div link="blue" vlink="purple" lang="EN-US"><div><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Can you manually minimize the modal dialog and then minimize the main window at all? The definition of a modal window is that you must interact with it first before returning to the main application, so I wouldn’t think that you could minimize both, and then somehow ever get back to the parent window.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);">Also, you should try reproducing this with C# or VB; this sounds like it has nothing to do with IronPython, just an issue with using the API.</span></p>
<p class="MsoNormal"><span style="font-size: 11pt; color: rgb(31, 73, 125);"> </span></p><div style="border-width: medium medium medium 1.5pt; border-style: none none none solid; border-color: -moz-use-text-color -moz-use-text-color -moz-use-text-color blue; padding: 0in 0in 0in 4pt;">
<div><div style="border-width: 1pt medium medium; border-style: solid none none; border-color: rgb(181, 196, 223) -moz-use-text-color -moz-use-text-color; padding: 3pt 0in 0in;"><p class="MsoNormal"><b><span style="font-size: 10pt;">From:</span></b><span style="font-size: 10pt;"> <a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a> [mailto:<a href="mailto:users-bounces@lists.ironpython.com" target="_blank">users-bounces@lists.ironpython.com</a>] <b>On Behalf Of </b>Ken MacDonald<br>
<b>Sent:</b> Monday, April 05, 2010 12:26 PM<br><b>To:</b> Discussion of IronPython<br><b>Subject:</b> [IronPython] WPF / ipy minimize weirdness?</span></p></div></div><div><div></div><div class="h5"><p class="MsoNormal">
</p><p class="MsoNormal">Hi,<br>I have a WPF app and I'm trying to mess with WindowState. I have two windows, a modal selection dialog, and a main window. If I bring up the selection dialog with the main window in background, and minimize the selection dialog, it leaves the main window visible but you can't interact with it. So far, normal.<br>
<br>If I make a selection, the select dialog closes leaving the main window, and I can minimize the main window using the standard windows controls, and restore it from the taskbar. OK so far.<br><br>However, I want to get it working like this: if I minimize the selection dialog, I'd like to minimize the main window also. So, I added an event listener on StateChanged, something like:<br>
<br>def state_changed(...):<br> if self._w.WindowState == WindowState.Minimized:<br> main_window.WindowState = WindowState.Minimized<br><br>This captures the minimize event, both the selection dialog and main window minimize, BUT now I can't right-or-left-click on the minimized app to get it to restore, and have to kill the app using task manager. Also, it appears that instead of having two windows represented on the taskbar, only the main window is left - even though I should still have both the select dialog and the main window minimized.<br>
<br>Is there some magic state I need to set in the main window to be able to have it restore again? Why should it make a difference whether the minimize is done by the main window 'min' button, or by setting its WindowState?<br>
Ken</p></div></div></div></div></div><br>_______________________________________________<br>
Users mailing list<br>
<a href="mailto:Users@lists.ironpython.com">Users@lists.ironpython.com</a><br>
<a href="http://lists.ironpython.com/listinfo.cgi/users-ironpython.com" target="_blank">http://lists.ironpython.com/listinfo.cgi/users-ironpython.com</a><br>
<br></blockquote></div><br>