?
Solved

form closing event windows mobile

Posted on 2010-09-24
3
Medium Priority
?
982 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 total points
ID: 33753281
it's easy - in UI Designer, set COntrol Box to False, that's it
0

Featured Post

Enroll in August's Course of the Month

August's CompTIA IT Fundamentals course includes 19 hours of basic computer principle modules and prepares you for the certification exam. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In this article we will discuss all things related to StageFright bug, the most vulnerable bug of android devices.
In this post we will learn how to make Android Gesture Tutorial and give different functionality whenever a user Touch or Scroll android screen.
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
Sometimes it takes a new vantage point, apart from our everyday security practices, to truly see our Active Directory (AD) vulnerabilities. We get used to implementing the same techniques and checking the same areas for a breach. This pattern can re…
Suggested Courses

777 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