![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
| |
| | #1 (permalink) |
| | Trying to make window from MTA thread... I have an application running in an MTA thread, and I want to pop up an Avalon window. So far, I've been creating the Window object in the MTA thread and calling Window.Dispatcher.Invoke with a delegate that calls ShowDialog, but that doesn't seem to be working...the first time it happens I get an exception saying that the window handle is invalid, and any future times the call works but no window appears. Do I have to create the Window object from an STA thread, or perhaps I'm doing something rather silly? Thanks, Nick |
My System Specs![]() |
| | #2 (permalink) |
| | Re: Trying to make window from MTA thread... MTA is not supported -- STA only. -- -Nick Kramer [MSFT] http://blogs.msdn.com/nickkramer --- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm "Nick" <Nick@discussions.microsoft.com> wrote in message news:CFC396BD-37C0-45FF-A5F8-D846185FC410@microsoft.com... >I have an application running in an MTA thread, and I want to pop up an > Avalon window. So far, I've been creating the Window object in the MTA > thread > and calling Window.Dispatcher.Invoke with a delegate that calls > ShowDialog, > but that doesn't seem to be working...the first time it happens I get an > exception saying that the window handle is invalid, and any future times > the > call works but no window appears. > > Do I have to create the Window object from an STA thread, or perhaps I'm > doing something rather silly? > > Thanks, > Nick |
My System Specs![]() |
| | #3 (permalink) |
| | Re: Trying to make window from MTA thread... Do you mean that you can only create windows from an STA thread, or do you mean that there isn't any possible interaction with MTA threads at all? What I'd like to do is create a new STA thread, create a window on that, and figure out how to start passing data to it. Is that not possible? Thanks, Nick |
My System Specs![]() |
| | #4 (permalink) |
| | Re: Trying to make window from MTA thread... Any thread with a WPF dispatcher requires STA, other non-UI threads can use MTA. -- -Nick Kramer [MSFT] http://blogs.msdn.com/nickkramer --- This posting is provided "AS IS" with no warranties, and confers no rights. Use of included script samples are subject to the terms specified at http://www.microsoft.com/info/cpyright.htm <user@domain.invalid> wrote in message news:OT5WZLnNGHA.668@TK2MSFTNGP11.phx.gbl... > Do you mean that you can only create windows from an STA thread, or do you > mean that there isn't any possible interaction with MTA threads at all? > > What I'd like to do is create a new STA thread, create a window on that, > and figure out how to start passing data to it. Is that not possible? > > Thanks, > Nick |
My System Specs![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| How do the current thread get thread notification of OS intruption | .NET General | |||
| Start a new thread from an existing thread, which was started from atimer | .NET General | |||
| make window bigger | Vista performance & maintenance | |||
| How to make the window smaller or get it above lower task bar | Vista mail | |||