停止在.show之后执行的代码 [英] Stop code to execute after .show

查看:68
本文介绍了停止在.show之后执行的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个工作项目,使用父表单在里面打开子表单。

所以我们必须使用form.show而不是showdialog,但某些form.show之后的某些代码必须执行,直到孩子关闭。

有没有办法在不使用showdialog的情况下这样做?



Thanx这么久

解决方案

没有。 Show启动打开对话框的过程并立即返回 - 在对话窗口甚至可见之前。



如果你想阻止进一步的操作,那么你需要实现手动,可能使用子窗体FormClosing事件来检测用户何时完成它。



ShowDialog会更容易......:笑:

We have a project at work that uses a parent form to open child forms inside.
So we have to use form.show and not showdialog,but certain code after some of the form.show's must'n execute until the child forms closes.
Is there a way to do this without using showdialog ?

Thanx so long

解决方案

No. Show starts the process of opening the dialog and returns immediately - before the dialog window is even visible.

If you want to prevent further actions, then you will need to implement that manually, probably using the child form FormClosing event to detect when the user is finished with it.

ShowDialog would be a lot easier...:laugh:


这篇关于停止在.show之后执行的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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