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.
大家好,我想确定如果出现错误,用户将不被允许退出表单是哪一行。我想它可能是下面的那个,但我不知道把它放在哪里
e.cancel
在您的FormClosing事件处理程序中:
FormClosing
e.Cancel = True