Wıindows does not shut down! Heelp!
-
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
-
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
Do you have some kind of loop or strangeness in your exit condition?
-
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
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