Bug 12848 - Error on Messagebox.show
Summary: Error on Messagebox.show
Status: RESOLVED INVALID
Alias: None
Product: Xamarin Studio
Classification: Desktop
Component: C# Binding ()
Version: 3.0.x
Hardware: PC Linux
: --- normal
Target Milestone: master
Assignee: Bugzilla
URL:
Depends on:
Blocks:
 
Reported: 2013-06-24 10:16 UTC by Frederik
Modified: 2013-06-27 01:13 UTC (History)
4 users (show)

Tags:
Is this bug a regression?: ---
Last known good build:

Notice (2018-05-24): bugzilla.xamarin.com is now in read-only mode.

Please join us on Visual Studio Developer Community and in the Xamarin and Mono organizations on GitHub to continue tracking issues. Bugzilla will remain available for reference in read-only mode. We will continue to work on open Bugzilla bugs, copy them to the new locations as needed for follow-up, and add the new items under Related Links.

Our sincere thanks to everyone who has contributed on this bug tracker over the years. Thanks also for your understanding as we make these adjustments and improvements for the future.


Please create a new report on Developer Community or GitHub with your current version information, steps to reproduce, and relevant error messages or log files if you are hitting an issue that looks similar to this resolved bug and you do not yet see a matching new report.

Related Links:
Status:
RESOLVED INVALID

Description Frederik 2013-06-24 10:16:44 UTC
Hello,

I'm learning C# on MonoDevelop and I'm trying to use the "MessageBox.Show("");" function, but there seems a small problem with it. When the message popup, it seems that I'm not able anymore to close it? It's a simple message with a "OK" button on it.. The code I did use I did copy here below...maybe I don't do something correct?

 
using System;
using System .Collections .Generic ;
using System.Windows.Forms; 
using System .Text ;
using Gtk;

//Go to Project --> "Edit References" & and activate:
//system.windows.forms


public partial class MainWindow: Gtk.Window
{	
	public MainWindow (): base (Gtk.WindowType.Toplevel)
	{
		Build ();
	}
	
	protected void OnDeleteEvent (object sender, DeleteEventArgs a)
	{
		Form.ActiveForm .Close ();
		a.RetVal = true;
	}

	protected void OnButton1Clicked (object sender, EventArgs e)
	{
		MessageBox.Show("The first window you make at Linux with MonoDevelop","Hello Linux...",System .Windows .Forms .MessageBoxButtons.OK ,MessageBoxIcon .Information );
			//throw new System.NotImplementedException ();
	}

}



Thanx
Frederik
Comment 1 Mike Krüger 2013-06-27 01:13:36 UTC
1. What has this to do with monodevelop ? 
2. You are mixing gtk and windows forms - how does this suppose to work ? Only use gtk in a gtk environment and forget about windows.forms.