[Mono-osx] Gtk# StatusIcon and Events

KenKen kenneth at hexad.dk
Sun Aug 1 09:14:14 EDT 2010

Yet another followup :).

The pastebin code works for the small example, but as soon as the code
starts to show a form, all sorts of semi-random errors occur, so that is NOT
the way to go.

After working some more on the problem, I figured out that windows forms can
display just fine, without calling System.Windows.Forms.Application.Run().
So, instead of calling that, I can simply call Gtk.Application.Run(), and
the trayicon works and forms are showing. The only remaining problem is the
Winforms context menu, which refuses to show unless there is also a visible

I have updated the TrayIconWrapper on the link previously posted to also
wrap the ContextMenuStrip with Gtk.Menu items. For most standard uses, the
TrayIconWrapper should now emulate a MWF trayicon, and my initial problems
are now solved.

Hope the code is of use to those attempting to port a MWF based application:

Regards, Kenneth
View this message in context: http://mono.1490590.n4.nabble.com/Gtk-StatusIcon-and-Events-tp2295916p2309422.html
Sent from the Mono - OSX mailing list archive at Nabble.com.

More information about the Mono-osx mailing list