在下一个表单中执行现有的表单关闭事件 [英] Executing existing form close event in next form

查看:50
本文介绍了在下一个表单中执行现有的表单关闭事件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我在Windows应用程序中有2个Windows窗体.

两种形式都有关闭事件.

当我单击下一步按钮后,从第一个表单中打开第二个表单时.现在打开第二个表单后,我得到第一个表单关闭事件消息框消息.

我正在显示消息框的第一个窗体关闭事件.打开第二个表单后,我得到的是相同的消息框.

为什么我得到这个.请帮帮我

谢谢

Hi,

I have 2 windows form in windows application.

both form has formclosing event.

When i am opening a second from from first form after clicking next button. Now after opening second form i am getting first form close event message box message.

The first form close event i am showing message box. the same message box i am getting after opening a second form.

Why i am getting this. Please help me

Thanks

推荐答案

可能您只是在代码中关闭了第一个表单.使用调试器,在第一个窗体的close事件上放置一个断点,并使用调试器和/或堆栈跟踪来找出关闭的来源.
Probably you''re just closing the first form in your code. Using debugger, place a breakpoint to the first forms close event and use the debugger and/or stack trace to find out where the close is coming from.


这篇关于在下一个表单中执行现有的表单关闭事件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆