C Windows Form 重新整理父窗體

2022-02-09 21:18:58 字數 1830 閱讀 7787

第一種方法:

用委託,form2和form3是同一組

form2

c#**

using system;

using system.collections.generic;

using system.componentmodel;

using system.data;

using system.drawing;

using system.text;

using system.windows.forms;

namespace testmousemove

private void button1_click(object sender, eventargs e)

private void setvisiable()

private void setvisiable(control control, bool visiable)}}

}

form3

c#**

using system;

using system.collections.generic;

using system.componentmodel;

using system.data;

using system.drawing;

using system.text;

using system.windows.forms;

namespace testmousemove

private void btnvisible_click(object sender, eventargs e)}}

}

第二種方法:

用變數,form4和form5是同一組

form4

c#**

using system;

using system.collections.generic;

using system.componentmodel;

using system.data;

using system.drawing;

using system.text;

using system.windows.forms;

namespace testmousemove

#region 子視窗重新整理父視窗的值

private string strlabel1 = "";

public string strlabel1

set}

#endregion

private void button1_click(object sender, eventargs e)

}}

form5

using system;  

using system.collections.generic;  

using system.componentmodel;  

using system.data;  

using system.drawing;  

using system.text;  

using system.windows.forms;  

namespace testmousemove  

private void button1_click(object sender, eventargs e)  

}  

} 第3種方法

遍歷窗體查詢

}

js重新整理父頁面

重新整理父頁面 self.opener.location.reload 或window.opener.location.reload 通常情況下,下面的 可以實現重新整理父頁面,避免出現 不重新傳送資訊,則無法重新整理網頁 對話方塊 window.opener.location.href windo...

winform 重新整理父窗體

網路上有幾種方法,先總結如下 呼叫窗體 父 form1,被呼叫窗體 子 form2 方法1 所有權法 form1 需要有乙個公共的重新整理方法 public void refresh method 在呼叫form2時,要把form2的所有者設為form1 form2 f2 new form2 f2....

關於重新整理父視窗

window.opener.location.href window.opener.location.href 就是彈窗的父頁面重定向到自己 window.opener.location.reload 是重新整理一下 window.opener.location.reload true true代表...