且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何将重点放在显示为对话框的表单中的文本框上?

更新时间:2023-02-13 14:56:32

如果数据无效,请使用IsValidData()方法调用textBox1.Focus()方法,而不要使用ReEnter变量和事件. .
Call the textBox1.Focus() method on the IsValidData() method if the data is not valid instead of using the ReEnter variable and events.


Hi应该是if(M.DialogResult == DialogResult.OK). Single =是赋值运算符,不是比较运算符.如果它是一个简单的消息框,则可以使用内置的System.Windows.Forms.MessageBox.不需要单独的表格.

祝你好运
Hi should be if(M.DialogResult == DialogResult.OK). Single = is an assignment operator, not compare operator. If it is a simple message box you can use inbuilt System.Windows.Forms.MessageBox. No need a separate form.

Good luck