[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Is there a input dialog box in C#

Posted on 2010-01-01
10
Medium Priority
?
2,000 Views
Last Modified: 2013-12-17
I was wondering if there is a built in message box in C#?
0
Comment
Question by:codecaine
  • 5
  • 4
10 Comments
 
LVL 11

Expert Comment

by:ICaldwell
ID: 26159893
Yes...

MessageBox.Show ("The calculations are complete", "My Application", MessageBoxButtons.OKCancel, MessageBoxIcon.Asterisk);

http://msdn.microsoft.com/en-us/library/aa984357(VS.71).aspx
0
 
LVL 29

Expert Comment

by:Kumaraswamy R
ID: 26159908
0
 
LVL 1

Author Comment

by:codecaine
ID: 26159917
So in conclusion you have to create you own dialog.
0
Fill in the form and get your FREE NFR key NOW!

Veeam is happy to provide a FREE NFR server license to certified engineers, trainers, and bloggers.  It allows for the non‑production use of Veeam Agent for Microsoft Windows. This license is valid for five workstations and two servers.

 
LVL 11

Expert Comment

by:ICaldwell
ID: 26159922
Ah yes, duh not MessageBox, you want a input box....

string answer = Microst.VisualBasic.Interaction.InputBox("Did you know your question goes here?","Title","Default Text");
0
 
LVL 11

Expert Comment

by:ICaldwell
ID: 26159925
Its built into .Net, you do not need to create your own dialog, you can use the built in code already created by Microsoft....
0
 
LVL 11

Accepted Solution

by:
ICaldwell earned 2000 total points
ID: 26159926
One more example:

 
Just add the reference "Microsoft Visual Basic .NET Runtime" to your project.
you needs to import "using Microsoft.VisualBasic;"
then try to access the inputbox method.

For ex:-

string x = Interaction.InputBox("hi","hello","nothing",10,10);
MessageBox.Show(x);
0
 
LVL 1

Author Closing Comment

by:codecaine
ID: 31671879
Thank you.
0
 
LVL 1

Author Comment

by:codecaine
ID: 26159941
I tried this line and aded using Microsoft.VisualBasic
string x = Interaction.InputBox("hi","hello","nothing",10,10);
It says Interaction not found
0
 
LVL 11

Expert Comment

by:ICaldwell
ID: 26159954
Did you add the reference to your project?

Add the reference "Microsoft Visual Basic .NET Runtime" to your project.
0
 
LVL 1

Author Comment

by:codecaine
ID: 26159960
Ah Thanks. I was missing that.
0

Featured Post

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
In a question here at Experts Exchange (https://www.experts-exchange.com/questions/29062564/Adobe-acrobat-reader-DC.html), a member asked how to create a signature in Adobe Acrobat Reader DC (the free Reader product, not the paid, full Acrobat produ…
Suggested Courses
Course of the Month20 days, 8 hours left to enroll

867 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question