I wrote library containing an InputBox class for C# but I can only call it once during a program. I access it from a program using the following code:
string input = Input.InputBox.Show (s);
This then accesses the Show() method:
box = new InputBox (s);
This code calls the appropriate constructor, then displays the InputBox form, and then returns the value set with the EventHandler:
this.GetInput = this.textbox.Text;
The first time I call it, this code will work without any trouble. If I then make another call to Input.InputBox.Show, however, I can see the form flash on the screen and then close immediately, returning an empty string. If I change "this.Close ();" to "this.Hide ();" I get the same result.
Any thoughts as to why the form won't remain open?