S
Stephen Cao
I have a for loop (below) in a Pocket PC Mobile OS 5, .NET Compact
Framework 2 SP2 app:
frmMain...
public void process()
{
QuestionList[] object;
Form1 frm1;
Form2 frm2;
for (i = 1; i < 10, i++)
{
switch QuestionList.type //type is 1 or 2
{
case 1:
frm1 = new Form1();
frm1.ShowDialog();
case 2:
frm2 = new Form2();
frm2.ShowDialog();
}
frm1.Dispose();
frm2.Dispose();
}
}
form2...
private void btnNext_Click(object sender, CancelEventArgs e)
{
this.Close();
}
form1
private void btnNext_Click(object sender, CancelEventArgs e)
{
this.Close();
}
My question is this: right now frm1 and frm2 are being closed; is
there a way to not close them but to reuse frm1 and frm2, showing
users frm1 or frm2, have them response to the form, and then passing
control back to for loop.
Thanks,
Stephen
Framework 2 SP2 app:
frmMain...
public void process()
{
QuestionList[] object;
Form1 frm1;
Form2 frm2;
for (i = 1; i < 10, i++)
{
switch QuestionList.type //type is 1 or 2
{
case 1:
frm1 = new Form1();
frm1.ShowDialog();
case 2:
frm2 = new Form2();
frm2.ShowDialog();
}
frm1.Dispose();
frm2.Dispose();
}
}
form2...
private void btnNext_Click(object sender, CancelEventArgs e)
{
this.Close();
}
form1
private void btnNext_Click(object sender, CancelEventArgs e)
{
this.Close();
}
My question is this: right now frm1 and frm2 are being closed; is
there a way to not close them but to reuse frm1 and frm2, showing
users frm1 or frm2, have them response to the form, and then passing
control back to for loop.
Thanks,
Stephen