Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9122129
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T06:01:23+00:00 2026-06-17T06:01:23+00:00

I am writting minesweeper game in c# silverlight. 1. How can I add a

  • 0

I am writting minesweeper game in c# silverlight.
1. How can I add a counter (counting seconds only) to this application?
2. How can I stop counter when application goes to the background (middle button, search button, incoming call etc.)?
3. How can I do something when WP7 is closing my application process? For example save current game to isolated storage.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T06:01:25+00:00Added an answer on June 17, 2026 at 6:01 am

    1) You need to use Timer

            timer.Tick += new EventHandler(timer_Tick); // Everytime timer ticks, timer_Tick will be called
            timer.Interval = (1000) * (10);             // Timer will tick evert 10 seconds
            timer.Enabled = true;                       // Enable the timer
            timer.Start();                              // Start the time
    
    void timer_Tick(object sender, EventArgs e)
            {
               //Do something
            }
    

    2) You need to handle OnNavigatedFrom Event:

    private void Application_Deactivated(object sender, DeactivatedEventArgs e)
    {
        //Do something
    }
    

    3) Here You have a 4 useful events:

        // Code to execute when the application is launching (eg, from Start)
    // This code will not execute when the application is reactivated
    private void Application_Launching(object sender, LaunchingEventArgs e)
    {
        //Do something
    }
    
    // Code to execute when the application is activated (brought to foreground)
    // This code will not execute when the application is first launched
    private void Application_Activated(object sender, ActivatedEventArgs e)
    {
        //Do something
    }
    
    // Code to execute when the application is deactivated (sent to background)
    // This code will not execute when the application is closing
    private void Application_Deactivated(object sender, DeactivatedEventArgs e)
    {
        //Do something
    }
    
    // Code to execute when the application is closing (eg, user hit Back)
    // This code will not execute when the application is deactivated
    private void Application_Closing(object sender, ClosingEventArgs e)
    {
        //Do something
    }
    

    Here You can read more about handle this events: http://msdn.microsoft.com/en-us/library/hh821027.aspx

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hi im writting a very simple game. Player can use mouse to move spaceship
I'v been bored so I created a small console minesweeper game and while writting
Writting custom script to add product to particular customer. In this way. $product =
Overview: I am writting an application to dynamically load .dlls and call their methods.
I am writting a dashboard application in Asp.net. When I load the main page
I'm writting voice chat in flash player communicator using Adobe Cirrus. I can't handle
I am writting a C++ command line application that will apply the Haar transform
Im writting an Application for Win8 with C# and Xaml. I have an Control
I am writting an Firefox add-on in XUL and I want to include another
I am writting an application that has multiple threads in Linux environment using C

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.