closing a form for mobile application

G

Guest

Hi,

I'm using vs 2005 to develop a mobile application. I have tried to use a
closing event to pop up a messagebox before close the form. It seems that the
form is hided. And I found out that the messagebox will occure after clinking
the setting -> memory -> application.

Besides, I have tried the event disposed, closed, too. It seems that it
doesnt pop up the messagebox.

How could I fix this problem? Which event or what should I do for this case?
Thanks!
 
W

William LaMartin

I don't know about mobile applications, but on the Pocket PC as best I can
tell you can't close forms--only hide them.
 
G

Guest

Thanks for your reply! I have tried to use the closing event to pop up a
msgbox to hide the form1 and show the form2. But it seems that form1 is not
hided and form2 is not showed. Besides, I have tried to use the deactived
event to perform this feature, it seems that the msgbox will pop up many
times. Is there any methods to achieve this design. Thanks!!
 
W

William LaMartin

I think this is more of a compact framework question than a regular vb.net
question. There is a compact framework newsgroup that specializes in such.

If what you have is a mobile application that starts with form1 and then you
want to switch to form2, what you need to do is (if it works like
programming for the PocketPC) is:

1. In the beginning of the form1 class put Public frmform2 As New form2

2. Then when you want to switch to form2, use frmform2.Show()

3. When in form2 and you want to switch to form1, use form1.focus ' since
form1 is already open. This for compact framework 2.
 

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