处理表单的关闭[x]按钮 [英] Handling The Close [x] Button Of A Form
问题描述
大家好,
有人可以帮我处理关闭按钮的点击事件(VB窗体右上角的[X]按钮。我想成为能够查询用户点击的意图,例如:他是否想在关闭之前保存...而不是关闭窗口。
我使用命令按钮实现此目的但是我也想为关闭按钮做同样的事情。
Hi everyone,
Can someone help me with a procedure to handle the clicked event of the Close button (The [X] button on the top right coner of a VB form. I want to be able to query the users intention for clicking, like: Does he want to save before closing ... instead of just closing the window.
I used a command button to achieve this but I also want to do same for the Close button.
推荐答案
大家好,
有人可以帮我处理关闭按钮的单击事件(VB窗体右上角的[X]按钮。我希望能够查询用户点击的意图,例如:他是否想要在关闭之前保存...而不是关闭窗口。
我使用命令按钮来实现这一点但我也想对关闭按钮执行相同操作。
Hi everyone,
Can someone help me with a procedure to handle the clicked event of the Close button (The [X] button on the top right coner of a VB form. I want to be able to query the users intention for clicking, like: Does he want to save before closing ... instead of just closing the window.
I used a command button to achieve this but I also want to do same for the Close button.
请不要在会员介绍中发布问题管道论坛。哎呀,甚至有一个帖子,标题要求你不要。
我正在将这个问题移到VB论坛。
问候,
>
Jeff
Please, DO NOT post questions in the Member Introductions Forum. Heck, there is even a thread with a title asking you not to.
I am moving this question to the VB forum.
Regards,
Jeff
大家好,
有人可以帮我处理单击关闭按钮的事件(VB窗体右上角的[X]按钮。我希望能够查询用户点击的意图,例如:他是否要在关闭之前保存...而不是仅仅关闭窗口。
我使用命令按钮来实现这一点,但我也希望对关闭按钮执行相同操作。
Hi everyone,
Can someone help me with a procedure to handle the clicked event of the Close button (The [X] button on the top right coner of a VB form. I want to be able to query the users intention for clicking, like: Does he want to save before closing ... instead of just closing the window.
I used a command button to achieve this but I also want to do same for the Close button.
嗨
尝试...
Hi
Try...
详细信息将取决于您使用的VB版本。
在VB6中,您将使用 QueryUnload形式和/或卸载事件。
The details will depend on what version of VB you''re using.
In VB6 you would use the form''s QueryUnload and/or Unload events.
这篇关于处理表单的关闭[x]按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!