禁用一个窗体上的另一个窗体上的按钮 [英] Disabling a Button on one Form from Another

查看:70
本文介绍了禁用一个窗体上的另一个窗体上的按钮的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有一个想要从单独表单上的复选框中禁用的按钮.它是一个选项窗口,一个选项是禁用某个按钮,但是该按钮在以前的表单上.如何禁用表单中的按钮?我不能开始输入文字,因为它不知道该按钮存在(由于它在另一种形式上).

I have this button that I want disabled from a check box on a separate form. It''s an options window and one option is to disable a certain button but the button is on the previous form. How can I disable the button from the form? I cant just start typing because it does not know the button exists (due to it being on another form).

推荐答案

使用复选框在表单中引发一个事件,带有按钮的表单进行预订.

Raise an event in the form with the checkbox that the form with the button subscribes to.


这篇关于禁用一个窗体上的另一个窗体上的按钮的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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