Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. Wıindows does not shut down! Heelp!

Wıindows does not shut down! Heelp!

Scheduled Pinned Locked Moved C#
databasehelp
3 Posts 3 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • U Offline
    U Offline
    Utku KAYA
    wrote on last edited by
    #1

    Hi all, Please some response! I have an applıcation and when it's running , Windows can not shut down! It says nothing but goes back to desktop when I click shut down. I really dont know why , maybe one knows. Key features about my application: - Uses OleDbConnection and OleDbDataAdapter for an Access2000 database. - Has a notify icon on task bar and starts from there (not with a window form) - Starts when Windows starts by using HKLM/..../CurrentVersion/Run All left are ordinary and what I have experience a lot. Any help will be appreciated. Thanks. Utku KAYA

    D J 2 Replies Last reply
    0
    • U Utku KAYA

      Hi all, Please some response! I have an applıcation and when it's running , Windows can not shut down! It says nothing but goes back to desktop when I click shut down. I really dont know why , maybe one knows. Key features about my application: - Uses OleDbConnection and OleDbDataAdapter for an Access2000 database. - Has a notify icon on task bar and starts from there (not with a window form) - Starts when Windows starts by using HKLM/..../CurrentVersion/Run All left are ordinary and what I have experience a lot. Any help will be appreciated. Thanks. Utku KAYA

      D Offline
      D Offline
      Daniel M Edwards
      wrote on last edited by
      #2

      Do you have some kind of loop or strangeness in your exit condition?

      1 Reply Last reply
      0
      • U Utku KAYA

        Hi all, Please some response! I have an applıcation and when it's running , Windows can not shut down! It says nothing but goes back to desktop when I click shut down. I really dont know why , maybe one knows. Key features about my application: - Uses OleDbConnection and OleDbDataAdapter for an Access2000 database. - Has a notify icon on task bar and starts from there (not with a window form) - Starts when Windows starts by using HKLM/..../CurrentVersion/Run All left are ordinary and what I have experience a lot. Any help will be appreciated. Thanks. Utku KAYA

        J Offline
        J Offline
        JJF007
        wrote on last edited by
        #3

        Your Problem is that you override the close function. So if Win tries to shutdown your app still wants to go to trayicon and prevents Win from Shutdown. Use this code to fetch the Win Shutdown Command: protected override void WndProc(ref Message m) { base.WndProc (ref m); if (m.Msg == 0x11) { boolAlowClose = true; this.Close(); } } So i think you have a bool where you set true if you want realy to leave the application (where you check the bool on app close event and set e.cancel) Hope this helps! Greets Matthias

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups