IdentifiantMot de passe
Loading...
Mot de passe oublié ?Je m'inscris ! (gratuit)
Navigation

Inscrivez-vous gratuitement
pour pouvoir participer, suivre les réponses en temps réel, voter pour les messages, poser vos propres questions et recevoir la newsletter

VB 6 et antérieur Discussion :

Savoir si l'EXE est sur un portable ou PC


Sujet :

VB 6 et antérieur

  1. #1
    Inactif  
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 054
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 054
    Points : 2 416
    Points
    2 416
    Par défaut Savoir si l'EXE est sur un portable ou PC
    Bonjour,
    Je n'ai rien trouvé dans les discutions ni tuto etc..
    Je cherche à savoir si mon appli se trouve sur un PC portable ou un PC
    En fait je veux gérer l'état de la batterie si l'appli est sur un portable, mais bien entendu, cela n'a pas de raison sur un PC sur secteur.
    La fonction Batterie c'est OK.
    j'emploi GetSystemPowerStatus....
    j'ai bien une piste mais je ne suis pas sur que cest la bonne.
    Sur mon portable ..ACLineStatus = 1
    Sur mon PC ..ACLineStatus = 128
    Merci de vos lumières
    A+

    EDIT: Je croyais que j'étais dans le bon forum
    Pourrait-ont déplacer SVP, Je ne sais pas si j'ai la possibilité de le faire (mon 1er poste).

  2. #2
    Expert éminent sénior


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Points : 20 040
    Points
    20 040
    Par défaut
    j'ai un portable et un PC de bureau sous la main ... je peu faire un test... donne moi un code que cela m'évite de chercher...

  3. #3
    Inactif  
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 054
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 054
    Points : 2 416
    Points
    2 416
    Par défaut
    Merci Bbil
    Voila le code à mettre dans un modul, j'ai purgé les alertes etc..

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    'Batterie
    Private Declare Function GetSystemPowerStatus Lib "kernel32" _
           (lpSystemPowerStatus As SYSTEM_POWER_STATUS) As Long
    Private Type SYSTEM_POWER_STATUS
       ACLineStatus As Byte
       BatteryFlag As Byte
       BatteryLifePercent As Byte
       Reserved1 As Byte
       BatteryLifeTime As Long
       BatteryFullLifeTime As Long
    End Type
    Public Portable As Boolean
    Public clignotBat As Boolean
    Public Sonner As Integer
     
     
    Function EtatBatterie() As String  ' fonction de check de batterie
    Dim Batterie As SYSTEM_POWER_STATUS
    Dim Restant As Integer
    Dim a$
    Dim i As Integer
    Static compter As Integer
    Static Sonner As Integer
     
        GetSystemPowerStatus Batterie
        If Batterie.ACLineStatus = 128 Then
            Portable = False
            Exit Function
        End If
        Restant = Batterie.BatteryLifePercent
        If Batterie.ACLineStatus = 1 Then
            EtatBatterie = "Sur secteur"
            If Restant < 100 Then
                EtatBatterie = "Sur secteur  B= " & Restant & "%"
            End If
     
        Else 'Batterie.ACLineStatus=0
            EtatBatterie = "Batterie " & Restant & "%"
        End If
    End Function
    Merci d'avance et encore mes excuse pour l'endroit de mon poste.
    A+

  4. #4
    Expert éminent sénior


    Profil pro
    Inscrit en
    Juin 2003
    Messages
    14 008
    Détails du profil
    Informations personnelles :
    Localisation : France

    Informations forums :
    Inscription : Juin 2003
    Messages : 14 008
    Points : 20 040
    Points
    20 040
    Par défaut
    bon...

    j'ai testé...

    et j'ai bien ACLineStatus = 128 pour le fixe...

    ACLineStatus =1 pour portable sur secteur

    ou ACLineStatus =0 pour portable sur batterie..;

    c'est ok aussi Batterie.BatteryLifePercent ... pour % restant..


  5. #5
    Inactif  
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 054
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 054
    Points : 2 416
    Points
    2 416
    Par défaut
    Merci bbil de ta réponse, je crois que je vais pouvoir m'y fier.
    Cordialement
    louis

  6. #6
    Rédacteur
    Avatar de DarkVader
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2002
    Messages
    2 130
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2002
    Messages : 2 130
    Points : 3 118
    Points
    3 118
    Par défaut
    Pour le fun ...
    et demain je poste pour moi car je galère sur mon problème depuis trop longtemps

    Code : Sélectionner tout - Visualiser dans une fenêtre à part
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    20
    21
    22
    23
    24
    25
    26
    27
    28
    29
    30
    31
    32
    33
    34
    35
    36
    37
    38
    39
    40
    41
    42
    43
    44
    45
    46
    47
    48
    49
    50
    51
    52
    53
    54
    55
    56
    57
    58
    59
    60
    61
    62
    63
    64
    65
    66
    67
    68
    69
    70
    71
    72
    73
    74
    75
    76
    77
    78
    79
    80
    81
    82
    83
    84
    85
    86
    87
    88
    89
    90
    91
    92
    93
    94
    95
    96
    97
    98
    99
    100
    101
    102
    103
    104
    105
    106
    107
    108
    109
    110
    111
    112
    113
    114
    115
    116
    117
    118
    119
    120
    121
    122
    123
    124
    125
    126
    127
    128
    129
    130
    131
    132
    133
    134
    135
    136
    137
    138
    139
    140
    141
    142
    143
    144
    145
    146
    147
    148
    149
    150
    151
    152
    153
    154
    155
    156
    157
    158
    159
    160
        Dim strComputer As String, objWMIService As Object, colItems As Object, objItem As Object
        Dim l As Long, t As String, HasBattery As Boolean
        strComputer = "."
        Set objWMIService = GetObject("winmgmts:\\" & strComputer & "\root\cimv2")
        l = 30
     
        Debug.Print String(60, "=")
        Debug.Print "Alimentation sur batteries"
        Debug.Print String(60, "=")
        Set colItems = objWMIService.ExecQuery("Select * from Win32_Battery")
        For Each objItem In colItems
            HasBattery = True
            t = "Availability": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Availability)
            t = "BatteryRechargeTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.BatteryRechargeTime)
            t = "BatteryStatus": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.BatteryStatus)
            t = "Caption": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Caption)
            t = "Chemistry": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Chemistry)
            t = "ConfigManagerErrorCode": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ConfigManagerErrorCode)
            t = "ConfigManagerUserConfig": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ConfigManagerUserConfig)
            t = "CreationClassName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.CreationClassName)
            t = "Description": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Description)
            t = "DesignCapacity": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DesignCapacity)
            t = "DesignVoltage": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DesignVoltage)
            t = "DeviceID": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DeviceID)
            t = "ErrorCleared": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ErrorCleared)
            t = "ErrorDescription": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ErrorDescription)
            t = "EstimatedChargeRemaining": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.EstimatedChargeRemaining)
            t = "EstimatedRunTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.EstimatedRunTime)
            t = "ExpectedBatteryLife": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ExpectedBatteryLife)
            t = "ExpectedLife": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ExpectedLife)
            t = "FullChargeCapacity": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.FullChargeCapacity)
            t = "InstallDate": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.InstallDate)
            t = "LastErrorCode": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.LastErrorCode)
            t = "MaxRechargeTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.MaxRechargeTime)
            t = "Name": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Name)
            t = "PNPDeviceID": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PNPDeviceID)
            For i = LBound(objItem.PowerManagementCapabilities) To UBound(objItem.PowerManagementCapabilities)
                t = "PowerManagementCapabilities": Debug.Print t + Space(l - Len(t)) + ":" & CStr(objItem.PowerManagementCapabilities(i))
            Next
            t = "PowerManagementSupported": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PowerManagementSupported)
            t = "SmartBatteryVersion": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SmartBatteryVersion)
            t = "Status": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Status)
            t = "StatusInfo": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.StatusInfo)
            t = "SystemCreationClassName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SystemCreationClassName)
            t = "SystemName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SystemName)
            t = "TimeOnBattery": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TimeOnBattery)
            t = "TimeToFullCharge": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TimeToFullCharge)
        Next
        If Not HasBattery Then Debug.Print " => Pas de batterie installée"
     
        Debug.Print
     
        HasBattery = False
        Debug.Print String(60, "=")
        Debug.Print "PortableBattery"
        Debug.Print String(60, "=")
        Set colItems = objWMIService.ExecQuery("Select * from Win32_PortableBattery")
        For Each objItem In colItems
            HasBattery = True
            t = "Availability": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Availability)
            t = "BatteryRechargeTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.BatteryRechargeTime)
            t = "BatteryStatus": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.BatteryStatus)
            t = "CapacityMultiplier": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.CapacityMultiplier)
            t = "Caption": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Caption)
            t = "Chemistry": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Chemistry)
            t = "ConfigManagerErrorCode": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ConfigManagerErrorCode)
            t = "ConfigManagerUserConfig": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ConfigManagerUserConfig)
            t = "CreationClassName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.CreationClassName)
            t = "Description": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Description)
            t = "DesignCapacity": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DesignCapacity)
            t = "DesignVoltage": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DesignVoltage)
            t = "DeviceID": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DeviceID)
            t = "ErrorCleared": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ErrorCleared)
            t = "ErrorDescription": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ErrorDescription)
            t = "EstimatedChargeRemaining": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.EstimatedChargeRemaining)
            t = "EstimatedRunTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.EstimatedRunTime)
            t = "ExpectedBatteryLife": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ExpectedBatteryLife)
            t = "AExpectedLife": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ExpectedLife)
            t = "FullChargeCapacity": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.FullChargeCapacity)
            t = "InstallDate": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.InstallDate)
            t = "LastErrorCode": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.LastErrorCode)
            t = "Location": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Location)
            t = "ManufactureDate": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ManufactureDate)
            t = "Manufacturer": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Manufacturer)
            t = "MaxBatteryError": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.MaxBatteryError)
            t = "MaxRechargeTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.MaxRechargeTime)
            t = "Name": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Name)
            t = "PNPDeviceID": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PNPDeviceID)
            For i = LBound(objItem.PowerManagementCapabilities) To UBound(objItem.PowerManagementCapabilities)
                t = "PowerManagementCapabilities": Debug.Print t + Space(l - Len(t)) + ":" & CStr(objItem.PowerManagementCapabilities(i))
            Next
            t = "PowerManagementSupported": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PowerManagementSupported)
            t = "SmartBatteryVersion": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SmartBatteryVersion)
            t = "Status": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Status)
            t = "StatusInfo": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.StatusInfo)
            t = "SystemCreationClassName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SystemCreationClassName)
            t = "SystemName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SystemName)
            t = "TimeOnBattery": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TimeOnBattery)
            t = "TimeToFullCharge": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TimeToFullCharge)
     
        Next
        If Not HasBattery Then Debug.Print " => Pas de gestion de batterie (!!!)"
     
        Debug.Print
     
     
        Debug.Print String(60, "=")
        Debug.Print "Onduleur (installation managée)"
        Debug.Print String(60, "=")
        HasBattery = False
        Set colItems = objWMIService.ExecQuery("Select * from Win32_UninterruptiblePowerSupply")
        For Each objItem In colItems
            HasBattery = True
            t = "ActiveInputVoltage": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ActiveInputVoltage)
            t = "Availability": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Availability)
            t = "BatteryInstalled": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.BatteryInstalled)
            t = "CanTurnOffRemotely": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.CanTurnOffRemotely)
            t = "Caption": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Caption)
            t = "CommandFile": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.CommandFile)
            t = "ConfigManagerErrorCode": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ConfigManagerErrorCode)
            t = "ConfigManagerUserConfig": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ConfigManagerUserConfig)
            t = "CreationClassName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.CreationClassName)
            t = "Description": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Description)
            t = "DeviceID": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.DeviceID)
            t = "ErrorCleared": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ErrorCleared)
            t = "ErrorDescription": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.ErrorDescription)
            t = "EstimatedChargeRemaining": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.EstimatedChargeRemaining)
            t = "EstimatedRunTime": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.EstimatedRunTime)
            t = "FirstMessageDelay": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.FirstMessageDelay)
            t = "InstallDate": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.InstallDate)
            t = "IsSwitchingSupply": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.IsSwitchingSupply)
            t = "LastErrorCode": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.LastErrorCode)
            t = "LowBatterySignal": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.LowBatterySignal)
            t = "MessageInterval": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.MessageInterval)
            t = "Name": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Name)
            t = "PNPDeviceID": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PNPDeviceID)
            t = "PowerFailSignal": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PowerFailSignal)
            For i = LBound(objItem.PowerManagementCapabilities) To UBound(objItem.PowerManagementCapabilities)
                t = "PowerManagementCapabilities": Debug.Print t + Space(l - Len(t)) + ":" & CStr(objItem.PowerManagementCapabilities(i))
            Next
            t = "PowerManagementSupported": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.PowerManagementSupported)
            t = "Range1InputFrequencyHigh": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range1InputFrequencyHigh)
            t = "Range1InputFrequencyLow": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range1InputFrequencyLow)
            t = "Range1InputVoltageHigh": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range1InputVoltageHigh)
            t = "Range1InputVoltageLow": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range1InputVoltageLow)
            t = "Range2InputFrequencyHigh": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range2InputFrequencyHigh)
            t = "Range2InputFrequencyLow": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range2InputFrequencyLow)
            t = "Range2InputVoltageHigh": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range2InputVoltageHigh)
            t = "Range2InputVoltageLow": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Range2InputVoltageLow)
            t = "RemainingCapacityStatus": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.RemainingCapacityStatus)
            t = "Status": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.Status)
            t = "StatusInfo": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.StatusInfo)
            t = "SystemCreationClassName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SystemCreationClassName)
            t = "SystemName": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.SystemName)
            t = "TimeOnBackup": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TimeOnBackup)
            t = "TotalOutputPower": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TotalOutputPower)
            t = "TypeOfRangeSwitching": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.TypeOfRangeSwitching)
            t = "UPSPort": Debug.Print t + Space(l - Len(t)) + ":" & (objItem.UPSPort)
        Next
        If Not HasBattery Then Debug.Print " => Pas d'onduleur managé"

  7. #7
    Inactif  
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 054
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 054
    Points : 2 416
    Points
    2 416
    Par défaut
    Bonjour DarkVader,
    Eh ben dit donc, un peu la fonction...
    Personnellement je n'ai pas besoin de tout ça, mais je ne saurais effectuer de tests, je n'ai pas la référence winmgmts.
    Cordialement

  8. #8
    Rédacteur
    Avatar de DarkVader
    Homme Profil pro
    Développeur informatique
    Inscrit en
    Mai 2002
    Messages
    2 130
    Détails du profil
    Informations personnelles :
    Sexe : Homme
    Localisation : France, Paris (Île de France)

    Informations professionnelles :
    Activité : Développeur informatique
    Secteur : High Tech - Éditeur de logiciels

    Informations forums :
    Inscription : Mai 2002
    Messages : 2 130
    Points : 3 118
    Points
    3 118
    Par défaut
    Bonjour,
    Tu disposes de quelle version !?
    WMI (wbemdisp.tlb) est installé systématiquement depuis win 2000 (voir dossier /system32/wbem)
    et le code fonctionne sur toutes les versions depuis win95.

    Tu n'es pas sous win4.3 au moins ?

  9. #9
    Inactif  
    Profil pro
    Inscrit en
    Juin 2007
    Messages
    2 054
    Détails du profil
    Informations personnelles :
    Localisation : Belgique

    Informations forums :
    Inscription : Juin 2007
    Messages : 2 054
    Points : 2 416
    Points
    2 416
    Par défaut
    Bonjour,
    Je suis sous XP et Vista, mais je ne connaissais pas cette référence.
    C'est OK ça fonctionne impec mais comme mon portable ne supporte pas PowerManagementSupported :Faux
    Ma fonction suffit largement.
    Mais merci, ça peu toujours servir et j'ai encore appris un peu plus.
    Cordialement.

+ Répondre à la discussion
Cette discussion est résolue.

Discussions similaires

  1. Savoir si la souris est sur un élément.
    Par westernz dans le forum Général JavaScript
    Réponses: 2
    Dernier message: 26/12/2011, 14h56
  2. Comment savoir si le personnage est sur un bloc ou non?
    Par Logyin dans le forum Développement 2D, 3D et Jeux
    Réponses: 5
    Dernier message: 03/02/2011, 09h26
  3. Réponses: 5
    Dernier message: 01/04/2008, 08h33
  4. Savoir si le cursor est sur une piece 3d
    Par Happy dans le forum OpenGL
    Réponses: 3
    Dernier message: 12/04/2006, 16h42
  5. Comment savoir si la souris est sur un TChart ?
    Par marsupilami34 dans le forum Composants VCL
    Réponses: 1
    Dernier message: 30/09/2005, 23h16

Partager

Partager
  • Envoyer la discussion sur Viadeo
  • Envoyer la discussion sur Twitter
  • Envoyer la discussion sur Google
  • Envoyer la discussion sur Facebook
  • Envoyer la discussion sur Digg
  • Envoyer la discussion sur Delicious
  • Envoyer la discussion sur MySpace
  • Envoyer la discussion sur Yahoo