Neh..biasanya kaLian MeLihat Program2 yaNg ada akan sePerti Windows screen Saver..keTika komputer/Program tidak digunakan seLama 5 meNit,maka dia akAn meminta Password uNtuk mengakTifkan windows...Nah..ini ada sCript di VB 6...
Copy Paste Listing ini di Module :
'idle login
Private Declare Function BeginIdleDetection Lib "Msidle.dll" Alias "#3" (ByVal pfnCallback As Long, ByVal dwIdleMin As Long, ByVal dwReserved As Long) As Long
Private Declare Function EndIdleDetection Lib "Msidle.dll" Alias "#4" (ByVal dwReserved As Long) As Long
Private Const USER_IDLE As Long = 1
Public reason As Long
'Procedure idlenya
Public Sub IdleBeginDetection(Optional ByVal IdleMinutes As Long = 1)
BeginIdleDetection AddressOf IdleCallBack, IdleMinutes, 0&
End Sub
Private Sub IdleCallBack(ByVal dwState As Long)
Select Case dwState
Case USER_IDLE
If reason = 0 Then
MenuuTama.Hide
FrmLogin.Show
End If
End Select
End Sub
Public Sub IdleStopDetection()
EndIdleDetection 0&
End Sub
yaNg buat di Form_Loadnya :
Private Sub MDIForm_Load()
AdjTimeout 1
End Sub
Private Sub AdjTimeout(ByVal Value As Long)
Select Case Value
Case Is > 15
Value = 15
Case Is < 0
Value = 0
End Select
TimeOut = Value
IdleStopDetection
If TimeOut Then
IdleBeginDetection TimeOut
End If
End Sub
seLamat menCoba yaH..
