InputBox

H

Hans Kamp

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 or
namespace Test.WinForm

Hans Kamp.
 
H

Hans Kamp

William Ryan said:
(e-mail address removed)
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 or
namespace 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.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top