<quote>
har du prøvet med at se om koden til at slukke i tips og tricks virker, hvis du ikke gør skal du prøve med en kode til nt da windows xp og nt er nået de sammen, pricipet er nemlig netværk.
-Thomas
Har du koden til NT?</quote>
prøv med nogle af følgende eksempler
*********************************'
'1 eksempel 1
'Øverste del skal i "General" og resten til en knap
Option Explicit
#If Win32 Then
Private Declare Function ShutdownWindows _
Lib "user32" Alias _
"ExitWindowsEx" (ByVal uFlags As Long, _
ByVal dwReserved As Long) As Long
#Else
Private Declare Function ShutdownWindows _
Lib "user" Alias _
"ExitWindows" (ByVal wReturnCode As Integer, _
ByVal dwReserved As Integer) As Integer
#End If
Private Const EWX_LOGOFF = 0
Private Const EWX_SHUTDOWN = 1
Private Const EWX_REBOOT = 2
Private Const EWX_FORCE = 4
'---------------------------------------------
Private Sub Command1_Click()
ShutdownWindows EWX_SHUTDOWN, 1
End Sub
'***********'
*****************************************
'2
'declaration
Private Const EWX_SHUTDOWN As Long = 1
Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
'code
'shut down the computer
lngResult = ExitWindowsEx(EWX_SHUTDOWN, 0&)
********************************************
'3
'decleration
Private Const EWX_LogOff As Long = 0
Private Declare Function ExitWindowsEx Lib "user32" (ByVal dwOptions As Long, ByVal dwReserved As Long) As Long
'code
'close all programs and log on as a different user
lngResult = ExitWindowsEx(EWX_LogOff, 0&)
*********************************************
jeg søgte på følgende web sider
http://users.cybercity.dk/~cfs4636/http://www.mobilixnet.dk/~mob83058/vbtext/http://sitelevel.whatuseek.com/query.gohttp://www.vbcodemagician.dk/http://www.vbcode.com/