[Mono-winforms-list] Close method not working?

Dave Russell russell at berbee.com
Fri Jul 1 14:02:14 EDT 2005


I've done a great deal of .NET programming under Windows, and I'm just
now starting to do so under Mono as well. So far, I've really been
impressed with the System.Windows.Forms classes - they seem to work
nearly identically to their Windows cousins!

The problem I'm having right now is closing windows. So, I'll pop up a
child window (like an about box) by creating a new instance of the
window's class, say AboutForm, ala:

AboutForm frm = new AboutForm();
frm.Show();

The About form, then has a simple OK button, with a single line in the
event handler:

this.Close();

The problem is that the window never closes! Even selecting the "X" in
the corner, or choosing Close from the system menu has no effect. Am I
missing something here? This code works perfectly fine when I build it
for Windows using VS.NET. Maybe there's some nuance I'm not aware of
here.

Thanks for the help,

Dave




More information about the Mono-winforms-list mailing list