Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 15543

VS 2013 Detect keyboard keydown event anywhere on screen, inside or outside project

$
0
0
Hello everyone,

I am trying to Detect both mouse click and keyboard keydown event anywhere on screen, inside or outside project. Google helps me to find mouse clicks anywhere on screen, but I couldn't find any solution to detect keyboard clicks.

Code:

Private Sub FrmSelectTask_Load(sender As Object, e As EventArgs) Handles MyBase.Load


        TimerMouseDetect.Start()
        TimerMouseDetect.Interval = 100

    End Sub

Code:

Private Sub TimerMouseDetect_Tick(sender As Object, e As EventArgs) Handles TimerMouseDetect.Tick

        If MouseButtons = Windows.Forms.MouseButtons.Left Then
            MouseClickCounts = MouseClickCounts + 1
        End If

        If MouseButtons = Windows.Forms.MouseButtons.Right Then
            MouseClickCounts = MouseClickCounts + 1
        End If

    End Sub

Anyone can help me to count keyboards clicks anywhere on screen

Thank you
Ladak

Viewing all articles
Browse latest Browse all 15543

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>