childform에서 parentform으로 부울 플래그를 전달하는 데 문제가 있습니다.childform에서 parent로 플래그를 전달하는 방법은 무엇입니까?
나는 예를 들어 childform하는 parentform에서 그것을 전달하는 방법을 알고
mainform에: childform에
Camera settings = new Camera(this.fullPath3);
settings.ShowDialog();
:
public partial class Camera : Form
{
//Zmienne przekazywane - sciezka do zapisu wzorca,
string _fullPath3;
...
public Camera(string fullPath3)
{
InitializeComponent();
_fullPath3 = fullPath3;
및 그 작품 ing. 내 childform에서 반환으로 bool 플래그를 추가하는 방법? 그런
뭔가 : childform에
: mainform에
public Camera(string fullPath3, bool flag)
:
Camera settings = new Camera(this.fullPath3,this.flag);
settings.ShowDialog();
if (flag==true) text2.text="OK!";
자녀 양식에 이벤트를 작성하고 상위 양식의 해당 이벤트에 연결하는 것이 어떨까요? 이렇게하면 부모 양식으로 정보를 다시 전달할 수 있습니다. – Jethro
이벤트를 사용할 수 있습니다. [Heres] (http://stackoverflow.com/questions/6382750/adding-an-event-handler-for-a-control-in-child-form-from-parent-form-in-c/6382869#6382869) 내 예제 – Reniuz