vb.net

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • rpradeepa
    New Member
    • Apr 2008
    • 23

    vb.net

    Hi,
    how to record the mouse movement and keystroke in vb.net

    Thanks in advance
  • kenobewan
    Recognized Expert Specialist
    • Dec 2006
    • 4871

    #2
    There are plenty of posts here re keypress etc. Search the site or google.

    Comment

    • rpradeepa
      New Member
      • Apr 2008
      • 23

      #3
      hi

      I got some code for mouse movement and keystroke in c++.
      i need a code in vb.net. can u please help me...


      Thanks in advance

      Comment

      • cloud255
        Recognized Expert Contributor
        • Jun 2008
        • 427

        #4
        Mouse Movements in VB:

        Code:
        mouseposition.X;
        mouseposition.Y;
        Key strokes:

        Code:
        e.KeyChar(); 'where e is an event handler of [B]System.Windows.Forms.KeyPressEventArgs[/B] type
        for these kind of things, its easy to just type in mouse or key and see what options intilisense gives you.

        Comment

        • rpradeepa
          New Member
          • Apr 2008
          • 23

          #5
          I need to store the recorded mouse movement and keystroke in the notepad
          and playback it when required

          Comment

          • cloud255
            Recognized Expert Contributor
            • Jun 2008
            • 427

            #6
            ok,

            have a boolean value which you set to true when you want to start recording.
            then in the mouseMove/keyPressed events set a check:

            if(recording)
            {
            strore the value to an array/list/some sort of playback object which has a list of mouse positions and a list of key strokes.
            }

            then when you want to stop recording, set recording to false. dump the data in the text file.

            When you want play back to start, re-populate your playback object from the text values and execute the data (mouse positions and key strokes)

            just remember if you want the user to see the mouse moving and key presses occuring you will need to use a timer to slow things down becuase the PC will move the mouse REALLY quickly.

            good luck

            Comment

            • Plater
              Recognized Expert Expert
              • Apr 2007
              • 7872

              #7
              Originally posted by rpradeepa
              Hi,
              how to record the mouse movement and keystroke in vb.net

              Thanks in advance
              Stop being lazy. This is not a real question.

              Comment

              Working...