子窗口 FrmC。
父窗口 FrmP
FrmP中调用FrmC
public class FrmP
{
FrmC newfrm = new FrmC
if(newfrm.ShowDialog()==DialogResult.OK)
{
int c=newfrm.a;
}
}
public class FrmP
{
public int a=0;
public int b=1;
this.DialogResult=DialogResult.OK;
}
父窗口 FrmP
FrmP中调用FrmC
public class FrmP
{
FrmC newfrm = new FrmC
if(newfrm.ShowDialog()==DialogResult.OK)
{
int c=newfrm.a;
}
}
public class FrmP
{
public int a=0;
public int b=1;
this.DialogResult=DialogResult.OK;
}
浙公网安备 33010602011771号