Solved

form closing event windows mobile

Posted on 2010-09-24
3
975 Views
Last Modified: 2013-12-21
Hi,

How can I trap form closing event, I tried below:
//form load event
this.Closing += new CancelEventHandler(Form1_FormClosing);

private void Form1_FormClosing(object sender, System.ComponentModel.CancelEventArgs e)

        {
            // Determine if text has changed in the textbox by comparing to original text.
         

        }
When I clicked "X" on form, I could not get close event that I defined.

Please help
0
Comment
Question by:sindhuxyz
  • 2
3 Comments
 
LVL 24

Expert Comment

by:alexey_gusev
ID: 33753149
the trouble with WinMo is that "x" does NOT close the form, but does what's called "Smart Close" which is in effect like "minimize"

so when you press "x" you'll get LostFocus or Activated - just experiment with it, add the handlers for those events and see when you arrive there.

personally, I tend to remove "x" from the forms, so if I want to let the user to exit it is done via Menu or whatever UI where I can control it
0
 
LVL 5

Author Comment

by:sindhuxyz
ID: 33753189
Ok, thanks for you advise.

Please tell me how to remove "X"

0
 
LVL 24

Accepted Solution

by:
alexey_gusev earned 500 total points
ID: 33753281
it's easy - in UI Designer, set COntrol Box to False, that's it
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

When I was a beginner in Windows Mobile programming, even for small test I used to create a single MFC dialog-based application with one button, and put my test code in the OnLButtonDown method. For Pocket PC it worked fine, on some Windows CE d…
Once again I push the limits of my phone.  An introduction to the Android Google Now Launcher.
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.
When you create an app prototype with Adobe XD, you can insert system screens -- sharing or Control Center, for example -- with just a few clicks. This video shows you how. You can take the full course on Experts Exchange at http://bit.ly/XDcourse.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

21 Experts available now in Live!

Get 1:1 Help Now