C# - Input Dialog box

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • DragonLord
    New Member
    • Mar 2007
    • 122

    C# - Input Dialog box

    Anyone know where to find the dll to add to the project or the name of the dll??
  • balabaster
    Recognized Expert Contributor
    • Mar 2007
    • 798

    #2
    Originally posted by DragonLord
    Anyone know where to find the dll to add to the project or the name of the dll??
    I'm not sure what you're referring to, but if you mean adding a DLL reference into your project so that you can reference classes inside that DLL:

    Pull up Solution Explorer
    Right click the name of your project
    Select "Add Reference..."

    The list of all your DLLs will show up...actually, it's a tabbed list displaying firstly the .NET managed namespaces, then COM DLLs which can be loaded using the interop (that's handled automatically when you select one of these). If you want to add a custom DLL, select the browse tab to go find a specific DLL on your machine.

    Hope that helps

    Comment

    • DragonLord
      New Member
      • Mar 2007
      • 122

      #3
      Well I knew how to add a reference but you did help and let me know what is under the .net tab lol... didn't know those were the name spaces.


      Well I know that there is an input dialog box for C# I just don't know under what namespace. How can i find that out?

      Comment

      • DragonLord
        New Member
        • Mar 2007
        • 122

        #4
        Well I knew how to add a reference but you did help and let me know what is under the .net tab lol... didn't know those were the name spaces.


        Well I know that there is an input dialog box for C# I just don't know under what namespace. How can i find that out?

        Comment

        • balabaster
          Recognized Expert Contributor
          • Mar 2007
          • 798

          #5
          Originally posted by DragonLord
          Well I knew how to add a reference but you did help and let me know what is under the .net tab lol... didn't know those were the name spaces.


          Well I know that there is an input dialog box for C# I just don't know under what namespace. How can i find that out?
          InputBox is an intrinsic object in VB 2005... and thus you shouldn't need to reference any namespaces to use it. However, in C# there isn't one - so you have to add a reference to the Visual Basic namespace in order to reference it. The namespace is Microsoft.Visua lBasic.Interact ion

          VB
          Code:
          Dim sInput As String = InputBox("Hello", "Enter something fun.", "Type something")
          C#
          Code:
          string sInput = Microsoft.VisualBasic.Interaction.InputBox("Hello", "Enter something fun", "Type something");
          Hope that helps

          Comment

          • oneous
            New Member
            • Feb 2010
            • 1

            #6
            Add SimpleInputDial og.cs file to your project which will find here: http://www.oronno.co.cc/C-Sharp-Tips-and-Tutorials.php

            Now, simply ask user to give input text by following line.... [ just like MessageBox.Show () ]
            Code:
            String inputMessage = InputDialogBox.Show("Enter Text:");

            Comment

            Working...