直接启动exe时没有选中文本框的文本

Textbox's text is not selected when launching the exe directly

我有一个简单的文本框,上面写着“用户名”。

想象一下我在说什么:

这一定是一些错误, 是否可以在直接启动exe时选择“用户名”默认文本?

您可以select文本框加载时的文本形式

private void Form_Load(object sender, EventArgs e)
{
    textBox1.SelectionStart = 0;
    textBox1.SelectionLength = textBox1.Text.Length;
}