by Karthikeyan (187 Submissions)
Category: Windows API Call/Explanation
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Thu 18th January 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)
Display the restart or shutdown dialog using RestartDialog API
API Declarations
uFlags As Long) As Long
Dim rval as long
'To Restart
rval = RestartDialog(Form1.hWnd, "I warn you that ", 2)
'To Shutdown
'rval = RestartDialog(Form1.hWnd, "I warn you to Shutdown the system ", 1)
End
End Sub