Erwin Meulen

Erwin Meulen

  • NA
  • 3
  • 1.6k

How to get a Pop-Up inputbox using a ToolStripMenuItem ?

Aug 3 2013 5:49 PM
I got a working program (Form1.xx) and added a menuStrip1 to it.

The first was the quit with the instruction;

        private void quitToolStripMenuItem_Click(object sender, EventArgs e)
        {
            this.Dispose();
        }

Okay, fine thats working.

Now I want to attach "something" to:   private void enterGetalToolStripMenuItem_Click(object sender, EventArgs e);

What I want to attach is a "simple" Pop-Up InputBox in C# to enter a number or letters, and after press the OK button
the Pop-Up Console must close and I want to use the variable in my program again.

Very simple to do in Visual Basic, but C# is driving me crazy. I read solutions with form in form samples and also a
solution to use the command:     using Microsoft.VisualBasic;

Seems to be simple, but I really don't get it to write more then 90 lines of coding to get it working, if it will work ?

Answers (1)