Moonshine
Registered User.
- Local time
- Today, 22:55
- Joined
- Jan 29, 2003
- Messages
- 125
I manged to finally sort out the code that lets you logoffwindows by running a function, this is the module called WinExit, then behind the button you want to use, you just put Run "LogOffWindows" and this one works fine
:
Option Compare Database
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As _
Long, ByVal dwReserved As Long) As Long
Function LogOffWindows()
'This will quit all applications and shut down Windows.
Dim x As Long
x = ExitWindowsEx(0, 0)
Application.Quit acExit
End Function
But, this one doesnt:
Option Compare Database
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As _
Long, ByVal dwReserved As Long) As Long
Function ShutDownWindows()
'This will quit all applications and shut down Windows.
Dim x As Long
x = ExitWindowsEx(1, 0)
Application.Quit acExit
End Function
The only thing that has changed is the (0,0) which is changed to (1,0) which is supposed to ShutDown windows... yet it doesnt. It quits teh application fine, but will not shut down
Can anyone spoke a mistake with the code?
Option Compare Database
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As _
Long, ByVal dwReserved As Long) As Long
Function LogOffWindows()
'This will quit all applications and shut down Windows.
Dim x As Long
x = ExitWindowsEx(0, 0)
Application.Quit acExit
End Function
But, this one doesnt:
Option Compare Database
Declare Function ExitWindowsEx Lib "user32" (ByVal uFlags As _
Long, ByVal dwReserved As Long) As Long
Function ShutDownWindows()
'This will quit all applications and shut down Windows.
Dim x As Long
x = ExitWindowsEx(1, 0)
Application.Quit acExit
End Function
The only thing that has changed is the (0,0) which is changed to (1,0) which is supposed to ShutDown windows... yet it doesnt. It quits teh application fine, but will not shut down
Can anyone spoke a mistake with the code?