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 6067911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T09:39:34+00:00 2026-05-23T09:39:34+00:00

In my Windows application, I do the following when the user click on the

  • 0

In my Windows application, I do the following when the user click on the power off button :

        void PowerButton_ButtonClicked(object sender)
    {
        DialogResult dl = MessageBox.Show(Globals.SECUEXIT, Globals.CMD_EXIT, MessageBoxButtons.OKCancel, MessageBoxIcon.Question, MessageBoxDefaultButton.Button1);
        if (dl == DialogResult.Cancel)
        {
            return;  //Power off canceled, nothing to do
        }
        else
        {
            Program.btConn.send(BtMsg.OFF);          //Send the turn off instruction to the BT device.
            Program.scr_SplashScreen.exitRequest();  
            Application.Exit();
        }
    }

It take ~15s until the application is closed on my mobile phone. How can I accelerate the process ?

Thanks !

  • 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-05-23T09:39:35+00:00Added an answer on May 23, 2026 at 9:39 am

    We have no idea what your app is actually doing when it closes. What happens after the Application.Exit() call? The runtime has to clean up things – so it has to call Dispose on objects and run that code, finalize everything, shut down connections and any hardware interfaces you’ve got open, stop all child threads and free up GC memory. You could easily have something in a Dispose method or Finalizer that takes a long time to execute.

    If you don’t already have a feel for what’s causing the problem, start removing large feature chunks to see which one is causing the slowness, then drill down into it, removing smaller and smaller pieces until you find it.

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

Sidebar

Related Questions

I a WPF application I have the following event-handler of a button-click in a
I would like to update a Windows Forms application to provide the following features:
I have only just started received the following error in my windows forms application
While porting a desktop application to windows mobile I've reached the following error: Error
I'm building a .net application with windows forms. I'm pondering on the following problem:
In almost any Windows application, I notice that holding the mouse button down in
I had a C# .NET windows application having C# user interface and all the
I have a Windows application that uses a .NET PropertyGrid control. Is it possible
We have a windows application that contains an ActiveX WebBrowser control. As part of
I have a managed Windows application that loads a managed C++ component that uses

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.