C# Visualbasic Inputbox

本文关键字:Inputbox Visualbasic | 更新日期: 2023-09-27 18:11:44

我使用了一个像这样的输入框

    private void Form1_Load(object sender, EventArgs e)
    {
        string host = "localhost";
        Interaction.InputBox("Database Information", "Host", host);
    }

这是完美的,但我怎么能更新字符串主机与新的键入文本时,点击ok

C# Visualbasic Inputbox

返回:

private void Form1_Load(object sender, EventArgs e)
{
    string host = "localhost";
    host = Interaction.InputBox("Database Information", "Host", host);
}