Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

form closing event windows mobile

Posted on 2010-09-24
3
Medium Priority
?
987 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

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

I think the most popular question in our Windows Mobile Programming zone is about the backlight - we all want to keep it on when our application is running. Few years ago the function SystemIdleTimerReset() did this job. On our side we had to detec…
With Windows Embedded Handheld, called Windows Mobile, Microsoft re-designed the user interface. The Start Icon moved down to the bottom, inside the menu bar area.   If you need to hide the Start Icon and/or the SIP (soft input panel, softwar…
How to fix incompatible JVM issue while installing Eclipse While installing Eclipse in windows, got one error like above and unable to proceed with the installation. This video describes how to successfully install Eclipse. How to solve incompa…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Suggested Courses

610 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