Hi<br><br>I am working on a very small (simple) application, mainly to get to know gtk-sharp better. But I need to hide a window, while another is showing. I want to do this when a button is pushed, I thought I could do this from the function connected to the button with the EventHandler, such as &quot;
button.Clicked += new EventHandler(next);&quot;<br>and put something like &quot;win.Visible = false;&quot; in that function, but when I do this I get a terrible error:<br><br>Unhandled Exception: System.NullReferenceException
: Object reference not set to an instance of an object<br>&nbsp; at dataHolder.test (System.Object temp) [0x00000] <br>&nbsp; at inputWindow.next (System.Object obj, System.EventArgs args) [0x00000] <br>&nbsp; at (wrapper delegate-invoke) 
System.MulticastDelegate:invoke_void_object_EventArgs (object,System.EventArgs)<br>&nbsp; at GLib.Signal.voidObjectCallback (IntPtr handle, IntPtr gch) [0x00000] <br>&nbsp; at (wrapper native-to-managed) GLib.Signal:voidObjectCallback
 (intptr,intptr)<br>&nbsp; at &lt;0x00000&gt; &lt;unknown method&gt;<br>&nbsp; at (wrapper managed-to-native) Gtk.Application:gtk_main ()<br>&nbsp; at Gtk.Application.Run () [0x00000] <br>&nbsp; at inputWindow.makeWindow () [0x00000] <br>&nbsp; at inputWindow..ctor (
System.Object temp) [0x00000] <br>&nbsp; at Sample.Main () [0x00000]<br><br>How can I avoid this? Hope my description was understandable, but pleas ask if there is something you don&#39;t understand.<br><br>Thanks in advance<br>
Søren Juul<br>