[Mono-osx] Winforms app under Mac OS X: change menu name

Alex Shulgin alexander.shulgin at yessoftware.com
Tue Nov 10 08:20:54 EST 2009

Lee V. Andrus wrote:
> The MonoDevelop for Mac Preview seems to have done the trick and more:
> http://go-mono.com/forums/#nabble-to23418439%7Ca23418568
> http://go-mono.com/forums/#nabble-to23418439%7Ca23418568 
> I am not sure how.  There is a mention that the Mac-friendly features
> involve a lot of PInvokes of Carbon functions.
> When I tried to do something similar with Cocoa via MCocoa & MObjc there
> seemed to be no connection between the menu displayed and the mainMenu
> property of the NSApplication object.  It was nil initially.  When I tried
> to create a menu and set this property to it, there was no change in the
> displayed menu.

The application name in main menu is set automatically by the system, 
when you launch a Mac OS X application, i.e. open a MyProgram.app 
special folder in Finder.  I don't know if there's any other method to 
set this name.

To handle Quit item correctly you'll need some magic with Carbon 
P/Invokes, though.


More information about the Mono-osx mailing list