Welcome to Dream.In.Code
Getting C# Help is Easy!

Join 136,549 C# Programmers for FREE! Get instant access to thousands of C# experts, tutorials, code snippets, and more! There are 1,860 people online right now. Registration is fast and FREE... Join Now!




Which namespace do I have to use?

 
Reply to this topicStart new topic

Which namespace do I have to use?, Input dialog boxes

gabehabe
23 Aug, 2008 - 06:57 AM
Post #1

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,539



Thanked: 98 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
This question is so simple that it's embarrassing. Oh well, I haven't done much GUI stuff yet... Which namespace do I need to be using, in order to be able to access the InputDialog class? I've looked everywhere, but I can't find it~

Thanks in advance.
-Danny

EDIT:
I just found something else, suggesting I have to make my own. Stupid tutorial.
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Which Namespace Do I Have To Use?
23 Aug, 2008 - 07:02 AM
Post #2

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,997



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
There is no InputDialog class in C#, only in VB.NET. So you have 2 choices:
  1. Create your own. Create a Forum, put a TextBox and 2 buttons, the use ShowDialog from the forum that calls it
  2. Reference the Microsoft.VisualBasic Namespace, like:
    csharp

    string sInput = Microsoft.VisualBasic.Interaction.InputBox("Hello", "Enter something fun", "Your Basic Input Dialog");

Unfortunately #2 isnt really a good idea as I feel if you're programming in C# you shouldn't reference the other language's Namespace. Just my opinion on that one
User is online!Profile CardPM
+Quote Post

gabehabe
RE: Which Namespace Do I Have To Use?
23 Aug, 2008 - 07:07 AM
Post #3

Donkey DIC
Group Icon

Joined: 6 Feb, 2008
Posts: 5,539



Thanked: 98 times
Dream Kudos: 2650
Expert In: ruling the world.

My Contributions
That was fast! Thanks Psycho~

I already started working on a new form, with a label, textbox and 2 buttons, like you said. Thanks again icon_up.gif
User is offlineProfile CardPM
+Quote Post

PsychoCoder
RE: Which Namespace Do I Have To Use?
23 Aug, 2008 - 07:13 AM
Post #4

using DIC.Core;
Group Icon

Joined: 26 Jul, 2007
Posts: 8,997



Thanked: 125 times
Dream Kudos: 8625
Expert In: VB, VB.Net, C#, SQL, ASP, ASP.Net, Web Development, HTML, CSS, Win32 API, Javascript, mySQL, J#, Boo.Net

My Contributions
No problem, that's what we're here for smile.gif
User is online!Profile CardPM
+Quote Post

Fast ReplyReply to this topicStart new topic
Time is now: 12/2/08 11:05PM

Live C# Help!

C# Tutorials

Reference Sheets

C# Snippets

DIC Chatroom

Bye Bye Ads

Monthly Drawing

Thumb Drive

Top Contributors

Top 10 Kudos This Month