Which control to use for quick text input (inputbox)?

前端 未结 2 394
陌清茗
陌清茗 2020-12-19 12:31

I need a quick text input dialog box (MessageBox with a single text box in it). Is there any control available or should I use a form?

I just want user to enter some

相关标签:
2条回答
  • 2020-12-19 12:53

    Microsoft.VisualBasic.dll has an InputBox method which you can use from C# to get a single string.

    For example (Add a reference to Microsoft.VisualBasic.dll first)

    using Microsoft.VisualBasic;
    
    string response = Interaction.InputBox("Enter a string:", "MyApp", "DefaultString", 0, 0);
    

    Othewise, you'll have to make your own form.

    0 讨论(0)
  • 2020-12-19 13:06

    simple one is inputbox

    0 讨论(0)
提交回复
热议问题