[RESOLVED]Can you make a shutdown confirmation?
If I press the power button on the computer, or if it is on accident and you are doing something really important, can a confirmation dialog appear and confirm if you really want to shut down? I mean like you have your program running, and while it is running (Form1_Running?):
If shutdown Activated Then
Dim Prompt As String
So on, So on...
Re: Can you make a shutdown confirmation?
Windows, etc should already do that! If you in the middle of writing a document, etc and the computer is restarted/shut down, the operating system should notify you of what is happening.
Re: Can you make a shutdown confirmation?
go into your power settings. there is an option on what to do if you press the power button. one of the options is to show the OS shutdown menu instead of simply powering off. Personally, i have mine set to go into hibernate.
Re: Can you make a shutdown confirmation?
Use a MsgBox,, using Yes.No
If msgbox.result = Yes then
........
End If
Re: Can you make a shutdown confirmation?
Quote:
Originally Posted by
Nightwalker83
Windows, etc should already do that! If you in the middle of writing a document, etc and the computer is restarted/shut down, the operating system should notify you of what is happening.
If it is this case, then It will prompt you to Save it.
Re: Can you make a shutdown confirmation?
Quote:
Originally Posted by
Lord Orwell
go into your power settings. there is an option on what to do if you press the power button. one of the options is to show the OS shutdown menu instead of simply powering off. Personally, i have mine set to go into hibernate.
Ok, I will try this.
Re: Can you make a shutdown confirmation?
Quote:
Originally Posted by
Battalion
Ok, I will try this.
Ok, I found Power Options>System Settings>Power Button Settings. It says:
When I press the power button:
Option 1: Do nothing
Option 2: Sleep
Option 3: Shutdown
I guess I should go with Option 1?
Re: Can you make a shutdown confirmation?
Quote:
Originally Posted by
Battalion
If it is this case, then It will prompt you to Save it.
It does prompt you to save it! ;)
Answering the above question yes, "option 1" will disable the power button.
Re: Can you make a shutdown confirmation?
well that's interesting. Evidently they changed the OS since an older version. My wife's xp install prompts when you push the power button. I'm runnin 7 now and it doesnt have a prompt option. What kind of bs...
Re: Can you make a shutdown confirmation?
Ok everyone, I have successfully disabled my power button so It won't turn off when it is pressed! So now my PC won't shutdown when it as accidentally pressed, thank-you very much!:wave: