Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
私の問題はこれです:フォームにAcceptButtonを設定すると、ボタンのClickイベントをトリガーするという素晴らしい効果が得られますが、MultiLineテキストボックスを使用している場合は、これが発生したくありません。それから私はそれにエンターを入れたいだけです。
これを行う方法はありますか?
テキストボックスの「AcceptsReturn」プロパティを true に設定します。
TextBoxコントロールには次のプロパティがあります。
TextBox
textbox1.AcceptsReturn = true;
MSDN ドキュメント