如何访问打开表单的按钮? [英] How to access button of opened form?

查看:58
本文介绍了如何访问打开表单的按钮?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

private void rbnbtnPageSetup_Click(object sender, EventArgs e)
    {
        if (IsFormOpen(typeof(GUI.Printing)))
        {

        }
        else
        {
            MessageBox.Show("Please Open Printing Form");
        }
    }





IsFormOpen(typeof(GUI。Printing))是打印表单打开时返回true的方法。



我想在打印表单中打开打印预览按钮。确保我不想打开新的打印表格。我的要求是如果打印表格打开然后按下该表格的打印prieview按钮。



请帮助我。谢谢。



IsFormOpen (typeof (GUI. Printing)) is the method that return true if printing Form is open.

I want to open the print preview button in Printing form. Make sure i don't want to open new printing form. my requirement is if printing form is open then press print prieview button of that form.

please help me. Thank You.

推荐答案

尝试 btnPreivew_Click(null,null); 其中 btnPreivew 是按钮的名称。
Try btnPreivew_Click(null,null); where btnPreivew is the name of your button.


这篇关于如何访问打开表单的按钮?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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