Results 1 to 5 of 5

Thread: Windows Hang on Shutdown

  1. #1

    Thread Starter
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Windows Hang on Shutdown

    If have an application that exists on the system tray, however if you try to shutdown windows while this application is not closed, windows hangs.

    Just wondering is there anyway to handle this gracefully


    Cheers

  2. #2
    Frenzied Member ntg's Avatar
    Join Date
    Sep 2004
    Posts
    1,449

    Re: Windows Hang on Shutdown

    No idea Strider, especially since you haven't posted any info about this app.

    Cheers,
    NTG
    "Feel the force...read the source..."
    Utilities: POPFileDebugViewProcess ExplorerWiresharkKeePassUltraVNCPic2Ascii
    .Net tools & open source: DotNetNukelog4NetCLRProfiler
    My open source projects: Thales SimulatorEFT CalculatorSystem Info ReporterVSS2SVNIBAN Functions
    Customer quote: "If the server has a RAID array, why should we bother with backups?"
    Programmer quote: "I never comment my code. Something that is hard to write should be impossible to comprehend."
    Ignorant quote: "I have no respect for universities, as they teach not practicle stuff, and charge money for"

  3. #3
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    Re: Windows Hang on Shutdown

    If in the form's closing event you have e.Cancel set to True, Windows will not be able to terminate it automatically. You need to add detection to see if Windows is terminating the program due to Windows shutting down and allow it to.
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

  4. #4

    Thread Starter
    Fanatic Member Strider's Avatar
    Join Date
    Sep 2004
    Location
    Dublin, Ireland
    Posts
    612

    Re: Windows Hang on Shutdown

    yes i have that in my form_closing event e.cancel = true.

    How would it be possible to detect that windows is shutting down from my application?

  5. #5
    Frenzied Member Ideas Man's Avatar
    Join Date
    Aug 2002
    Location
    Australia
    Posts
    1,718

    Re: Windows Hang on Shutdown

    Try this, this is what I use and it works quite well.

    http://www.vbforums.com/showpost.php...65&postcount=4
    I use Microsoft Visual Basic 2005. (Therefore, most code samples I provide will be based around the .NET Framework v2.0, unless otherwise specified)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width