Re: [Ironpython-users] ShowDialog Hangs

2015-02-25 Thread Andrew Ayre
no message loop on your thread for it to pump so > that is probably why it hangs. > > Regards > > Andy graham > > -Original Message- From: Andrew Ayre > Sent: Wednesday, February 25, 2015 4:41 PM > To: [email protected] > Subject: Re: [Ironpython-

Re: [Ironpython-users] ShowDialog Hangs

2015-02-25 Thread Andrew Graham
@python.org Subject: Re: [Ironpython-users] ShowDialog Hangs Thanks for the responses. Strangely the following script works: import clr import time clr.AddReference("System.Windows.Forms") from System.Windows.Forms import OpenFileDialog, DialogResult, Form F = Form() F.Show() time.slee

Re: [Ironpython-users] ShowDialog Hangs

2015-02-25 Thread Andrew Ayre
Thanks for the responses. Strangely the following script works: import clr import time clr.AddReference("System.Windows.Forms") from System.Windows.Forms import OpenFileDialog, DialogResult, Form F = Form() F.Show() time.sleep(5) This displays a form and then closes it when the script ends after

Re: [Ironpython-users] ShowDialog Hangs

2015-02-25 Thread Slide
You need to make sure the thread was started as an STAThread I believe, otherwise the common windows controls (OpenFileDialog being one of them) won't work correctly. On Wed Feb 25 2015 at 2:02:32 AM Andrew Ayre wrote: > I am sure I am making a silly mistake somewhere. > > I have IronPython embe