如何在C#中获取上一页控件? [英] How to get previous page controls in c#?
本文介绍了如何在C#中获取上一页控件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在获取C#中的上一页控件时遇到问题,请帮我举个例子,谢谢.......
i am facing problem to getting previous page controls in c# please help me with example thanks.......
推荐答案
在创建实例时传递控件新表格
例如.
pass controls while create instance of new form
eg.
public class formDest
public sub new(byval c as control)
'something to do
end sub
end class
现在,将控制权从源表单传递到目标表单
now, pass control from source form to destination form
public class formSource
public sub btn_click(...) Handels Btn.click
dim fd as new formDest(btn1) ' this line will initialize form (using New) and pass the btn1 control to destination form through parameter
fd.show()
end sub
end class
这篇关于如何在C#中获取上一页控件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文