I have program , start when windows start. Users have to open this app and they can’t close it. When users open it, a variable in sql will be true, but I want before shutdown windows this variable will be false. How this possible? Users can’t close the app: e.Cancel = true; but I want before shutdown , variable in database will be false. thanks
do some code before shutdown windows
106 Views Asked by tara1367 At
1
There are 1 best solutions below
Related Questions in SQL
- Can MVC.NET prevent SQL-injection at razor or controller level?
- SQL server not returning all rows
- When dealing with databases, does adding a different table when we can use a simple hash a good thing?
- Creating a parametrized field name for a SELECT clause
- Combine two rows based on common ID
- Column displays each count
- Slick query for one to optional one (zero or one) relationship
- Aggregate and count in PostgreSQL
- MAX and GROUP BY - SQL
- SQL statement for a tricky 2 table query
- How to create nested selects with sql?
- Pull and push data from and into sql databases using Excel VBA without pasting the data in Excel sheets
- Best Practice for adding columns to a Table in Oracle database
- SQL FIFO STACK using two tables
- SQL Query - Order by String (which contains number and chars)
Related Questions in WINDOWS
- Get Maximum Log Size
- Debugging Windows Services while starting
- Possible consequences of duplicate ProgId for different classes
- How to chain BCryptEncrypt and BCryptDecrypt calls using AES in GCM mode?
- mingw-64 conflicting declarations when cross-compiling
- I run an EXE program from a Windows Service but I can't see form C#?
- Why is PowerShell "not recognized" when installing Chocolatey?
- How to check if Windows device is phone or tablet/pc?
- How to add directories to Cygwin gcc default search path
- Can't install anything with pip2 on Windows 7 due to UnicodeDecodeError
- Active directory and linux nslcd binding without extending the AD schema
- How To Prevent Over Scrolling in Scroll Viewer Windows Phone 8.1
- Unicode error from pip install
- Where is the 'EnablePinning' property in the ribbon framework's recent items?
- How can I implement the same models and data across ASP.NET and Windows Apps
Related Questions in VARIABLES
- Simplexml get path from variable
- Python - Dynamically naming variables
- Azure Web App PATH Variable Modification
- How can I pass variable to ansible playbook in the command line?
- Fetching URL vars into form and submitting to other page
- Iframe not passing url parameters
- Stata: Retrieve variable label in a macro
- How to make all variables in javascript script have two decimal points
- Javascript works with HTML but not in Rails
- Running Line of code twice causes activeX error 0x8000ffff
- Erlang syntax error unclear
- CMD specifying columns to save?
- Simplify code with sending Methods as Variable
- Calling a variable in Matlab without using the full name?
- How to call c-style cleaner functions implicitly?
Related Questions in STARTUP
- get all startup processes in windows
- RPi running script at boot then stops
- Java move application to startup folder
- Detect Matlab startup from toolbox
- How to start with liferay
- bento start command fails with NoClassDefFoundError DNSCheckingTool
- Entity Framework Code First 30+ seconds StartUp Time
- How to load database at App Start up?
- Android CalendarView with no default date needed
- Insert data in collection at Meteor's startup
- BBB [debian] How to execute LSBInitscript AFTER loading device tree overlay?
- Error On MongoDB Start Up
- chkconfig not adding redis init script
- Change Stack Location for Cortex M3 in Startup.s file
- Running code without ssh in beaglebone black
Related Questions in SHUTDOWN
- Confusion about CTRL_SHUTDOWN_EVENT handling in DLLs and WM_QUERYENDSESSION
- Processing - Shutdown a computer
- Unstable instances and unexpected instance shutdown with GAE / java
- How to hide Shut Down and Log Off through commandline(script) without reboot
- RESTEasy JAX-RS application not calling @PreDestroy
- Linux Shutdown and Java Shutdown Hook
- InitiateShutdown, can't understand a value passed to the function
- Batch listen for ping to shutdown
- How to run applescript on shutdown?
- C++: Remotely hibernate a PC
- Scheduler with name "DefaultQuartzScheduler" already exists and scheduler cannot be started after shutdown
- Windows server power off button and blocked sessions
- How to trigger the java shutdown hook for a keep running process?
- How to tell if a Windows server is in the act of shutting down
- do some code before shutdown windows
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You should catch event on windows shutting down. And in handler you can exec sql query, that change your field in table.
Here you can get more information about windows shutting down: How to detect Windows shutdown or logoff
EDIT
You can use this code in handler of FormClosing event:
When Windows is shutting down it send close signal to all applications.