[Mono-list] Can't get C# OSX app to appear in front of the app that runs it

Jonathan Mitchell jonathan at mugginsoft.com
Wed Nov 11 09:47:06 UTC 2015

> On 11 Nov 2015, at 09:09, sams <samspurgeon at gmail.com> wrote:
> Hi there,
> I am writing an OSX C# app that behaves a bit like a plugin. The app it is
> written for has a "custom button" function that will start my app and pass
> it the filepath of some XML in the run command. 
> My problem was initially that my app would run underneath the calling app. I
> solved this by adding the following two lines in the DidFinishLaunching
> routine that opens the form from AppDelegate (myWindow is an instance of the
> window controller:
> myWindow.Window.OrderFrontRegardless ();
> myWindow.Window.BecomeFirstResponder ();
Perhaps that should be MakeFirstResponder(sender).
The docs state that OrderFrontRegardless: does not change the key window status, so:
try MakeKeyAndOrderFront(sender)


More information about the Mono-list mailing list