"William Ryan" <do********@comcast.nospam.net> schreef in bericht
news:04****************************@phx.gbl...
do********@comcast.nospam.net
www.knowdotnet.com-----Original Message-----
How do I use InputBox?
private void addButton_Click(object sender, System.EventArgs e) {
string newName;
newName = InputBox("t1", "t2", "t3");
namesListBox.Items.Add(newName);
}
namesListBox is a ListBox in the main window of my
application.
This code generates an error:
[C# Error] WinForm.cs(103): The name InputBox doesn't
exist in the class ornamespace Test.WinForm
There isn't one native in C#, but this guy made one (you
could make your own easy enough).
I have also made one myself. It is much like the InputBox from VB and VBA,
but mine is a class with some properties (so by using getters and setters).
This class is derived from a Dialog Box form.
I am quite an explorer right now, that is quickly discovering the secrets of
C# en C#Builder.
Hans Kamp.