ZTPdiffusion
Messages postés46Date d'inscriptionlundi 16 avril 2001StatutMembreDernière intervention 7 mars 2002 22 janv. 2002 à 21:23
Salut
Pour répondre à ta question il te faut une form avec 2 controles Timer avec la propriété Enabled à True (Timer1 : Propriété Interval à 1000 et Timer2 avec propriété Interval à 1)
Dans le code de ta Form tu places le code qui suit :
'DECLARATION DES FONCTIONS
'FONCTION MISE EN VEILLE DE L'ORDINATEUR
Private Declare Function SetSystemPowerState Lib "kernel32" (ByVal fSuspend As Long, ByVal fForce As Long) As Long
'FONCTION POUR DECLENCHEMENT DE L'ECRAN DE VEILLE
Private Declare Function SendMessage Lib "User32" Alias "SendMessageA" (ByVal hWnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long