Anyway to handle Today event...?

G

Guest

Hi,

I am using POCKET PC iPaq model.
There is Today menu acts like "Show Desktop" icon in Desktop.

Suppose there are three forms...

When my application runs, Form A will be shown....On form A, there is button
A.
When user clicks button A, Form B will be created and shown. On Form B,
there is button B. When user clicks button B, Form C will be created and
shown...

This means....in current window memory, Form A -> Form B -> Form C...

On Form C, when user clicks 'Today' menu, every form will be minimized, so
when user wants to go back our application, they can run our application
again. If they run our app again, Form C will be activated and shown again.
Until now, that's fine.....After they close the Form C, Form B should be
shown again to keep conitue using our app. However, it is NOT because it was
already disappeared by clicking Today menu....so user had to activate the
form again by Memory panel or run our application again.......This is
something that I didn't expect.....How do I workaround for this?

When user goes back our application from Today, I would like to make three
forms staying same order.....so even though user closes Form3, they will be
able to see Form2...and so on....

It is hard to explain, so hope you guys understand what I am trying to ask...

Thank you in advance.

..........................TJ
 
A

Alex Feinman [MVP]

I'm familiar with the problem. If your application uses ShowDialog() to
display the child form, you can call BringToFront() to ensure that the
parent form is visible upon the return from ShowDialog
In general, the best way to bring the NETCF application to the foreground is
to launch it again. This can be done from inside the running instance as
well
 
G

Guest

Hi,

Thanks for reply...
No, BringToFront() doesn't work if user has clicked "TODAY" menu....

Try this one.

Class A : Form {
.....
....
void btnCreateBForm_Click() {
B b = new B();
b.ShowDialog();
this.BringToFront(); // Actually, it doesn't make difference in this
issue.
}
....
...
static void Main()
{
Application.Run(new A());
}
}

Class B : Form {
}


When you run this app, A will be shown. If you invoke btnCreateBForm_click
method by clicking the button, B will created and shown on top of form A.
At this point, On the Form B, click Start->Today, and then every form will
be minimized........if you lunch this app again, Form B will be shown. When
you close the Form B, Form A will not be shown.

Thanks.

...........................................................TJ
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top