logoff
Visual Basic
2
Posts
2
Posters
0
Views
1
Watching
-
how can i logoff windows 9x using vb codes
-
how can i logoff windows 9x using vb codes
Public Declare Function ExitWindowsEx Lib "User32" Alias "ExitWindowsEx"(ByVal uFlags as Long,ByVal dwReserved as Long) as Long
Inside your form where you want to log off the user include:
Call ExitWindowsEx(EWX_LOGOFF,0)
The first arguement has several options: EWX_FORCE = 4 Force any applications to quit instead of prompting the user to close them. EWX_LOGOFF = 0 Log off the network. EWX_POWEROFF = 8 Shut down the system and, if possible, turn the computer off. EWX_REBOOT = 2 Perform a full reboot of the system. EWX_SHUTDOWN = 1 Shut down the system. Hope this helps Nick Parker