怎么做:IF(此表格有效) [英] How to do: IF (This Form Is Active)

查看:61
本文介绍了怎么做:IF(此表格有效)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

大家好..那语言是c#...



这就是我想做的事:



IF(form1 ==有效)

{

}



else

{

}



我不知道它的代码...换句话说,我想要代码如果表格当前处于活动状态(点击),则仅执行



如果它未激活,则会转到其他地方。





谢谢大家!

Hello there guys.. The language is c#...

This is what I am trying to do:

IF(form1 == active)
{
}

else
{
}

I dont know the code for it... in another words, I want the code to execute ONLY if the form is currently Active(Clicked on)

If it is NOT active, it will go to else.


Thanks guys !

推荐答案

你需要 Form.ActiveForm [ ^ ] property。
You need Form.ActiveForm[^] property.


你可以使用



if(Form.ActiveForm == this)
You can use

if (Form.ActiveForm == this)


这篇关于怎么做:IF(此表格有效)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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