Re: Message Loops

2010-10-14 Thread Matt Siebert
Agreed. The thing is, in this scenario, the client in the other process will provide a very rich GUI. By passing the window handle from my form in the native app's process to my GUI in it's own process, I can set my GUI's parent window appropriately so that clicking the native app's main window a

Re: Message Loops

2010-10-14 Thread noonie
Matt, Go with the second option if you need to block the GUI. Hiding this sort of stuff from users in almost never a good idea. Most users will accept an informed wait time over an apparently hung app. -- noonie On 15 October 2010 13:34, Matt Siebert wrote: > Bugger. As I suspected the orig

RE: Message Loops

2010-10-14 Thread Ben.Robbins
I'd go with the little locked form in front. Otherwise it will appear to the user that the main application has hung (when they click on it nothing will happen and they won't know why because the modal form is not visible). From: ozdotnet-boun...@ozdotne

Re: Message Loops

2010-10-14 Thread Richard Mason
I think the NativeWindow class may be able to help you run a simple message loop without any UI. Here's some quick code I threw together in LINQPad as a proof of concept. void Main() { var w = new MyWin(); w.CreateHandle(new CreateParams()); Thread.Sleep(5000); w.DestroyHandle(); } // Define oth

Re: Message Loops

2010-10-14 Thread Matt Siebert
Bugger. As I suspected the original call from the client is blocked so re-entrant callbacks from the service can't run on that thread. Form.ShowDialog() seems to be the simplest option, but I'd really like it to be hidden from the user. I understand that this means I'll have to take care to ensu

Re: Free beta certification exams for Silverlight 4 & Azure

2010-10-14 Thread Winston Pang
Thanks for the heads up David. On 15/10/2010, at 10:48 AM, David Burela wrote: > I thought the list would be interested in this > Microsoft just announced the availability of beta exams for Silverlight 4 & > Windows Azure. They will be available until November 17th. > It is a free way to exper

Re: Message Loops

2010-10-14 Thread Matt Siebert
Yes, I need to block the thread. Once control has returned to the native app my add-in can no longer talk to its API, until the native app calls it again. The WCF service would actually be started when the native app starts up. The native app gives add-ins a chance to startup and shutdown, and c

Free beta certification exams for Silverlight 4 & Azure

2010-10-14 Thread David Burela
I thought the list would be interested in this Microsoft just announced the availability of beta exams for Silverlight 4 & Windows Azure. They will be available until November 17th. It is a free way to experience what Microsoft certifications are like, and it will help prepare you if you do want to

RE: Message Loops

2010-10-14 Thread Bill McCarthy
Hi Matt, Are you sure you need to block the thread ? As in what happens if in the managed add-in you store the context when the method is first called then spin off a new thread, and finally invoke back on the original context ? If you can't do that, then a modal form sounds like a good idea to m

Re: Message Loops

2010-10-14 Thread Matt Siebert
No directly, but I'm pretty certain I could get it. On Fri, Oct 15, 2010 at 7:46 AM, Mitch Denny wrote: > Does the app give you some kind of handle to the Window when it spins up > your add-in? > > > > Regards > > *Mitch Denny > *Readify | Chief Technology Officer > > Suite 408 Life.Lab Building

Re: Message Loops

2010-10-14 Thread David Richards
Have you tried opennet? I seem to recall using something similar in opennetcf. ApplicationEx I think. As a word of warning though, I discovered issues with click events (and presumeably any event) being fired during the transition. ie, the events would be lost when I was returning from the new m

RE: Message Loops

2010-10-14 Thread Mitch Denny
Does the app give you some kind of handle to the Window when it spins up your add-in? Regards Mitch Denny Readify | Chief Technology Officer Suite 408 Life.Lab Building | 198 Harbour Esplanade | Docklands | VIC 3008 | Australia M: +61 414 610 141 | E: mitch.de...@readify.net

Message Loops

2010-10-14 Thread Matt Siebert
G'day folks, Aside from Application.Run() and Form.ShowDialog(), are there any other ways to run a message loop in a .NET app? I'm not keen on rolling my own message loop, I'm just wondering if there are other options already available. Why do I want to do this? Well I'm developing an add-in fo