<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=us-ascii"><meta name=Generator content="Microsoft Word 14 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=EN-US link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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&#8217;t think that you could minimize both, and then somehow ever get back to the parent window.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'>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.<o:p></o:p></span></p><p class=MsoNormal><span style='font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><div style='border:none;border-left:solid blue 1.5pt;padding:0in 0in 0in 4.0pt'><div><div style='border:none;border-top:solid #B5C4DF 1.0pt;padding:3.0pt 0in 0in 0in'><p class=MsoNormal><b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'>From:</span></b><span style='font-size:10.0pt;font-family:"Tahoma","sans-serif"'> users-bounces@lists.ironpython.com [mailto:users-bounces@lists.ironpython.com] <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?<o:p></o:p></span></p></div></div><p class=MsoNormal><o:p>&nbsp;</o:p></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>&nbsp;&nbsp;&nbsp; if self._w.WindowState == WindowState.Minimized:<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 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<o:p></o:p></p></div></div></body></html>