Question Controlling efficiency of employees

Abdelali Aloui

New member
Joined
Sep 18, 2011
Messages
2
Location
Sfax, Tunisia
Programming Experience
1-3
Good evening,
I am a beginner I want to make an application that allows the manager of the company whether the employees are truly active: screenshot and a "timer" to measure the time of the activity of the employee
Can be controlled using the mouse or keyboard while the application is not active, but in execution.

Is it possible in vb.net to know if the user of the machine is using the mouse or keyboard? My idea is to set a "Timer" which triggers automatically after the connection of the employee and every 10 seconds the application checks whether the mouse position has changed or a letter is entered on the keyboard except the"Timer" Will Be stopped until have a new mouse position or activity on the keyboard. But the problem is: is the application able to know the position of the mouse or to capture all keyboard input even if the application n 'is not active(not in the foreground)?

thank you
 
What your asking is poissible yes, but the program would be still running in the background to capture mouse/keyboard events, but not visable to the user, Unless needed to, you could even run it as a Windows service, here's a link to show you how to capture the screen Creating a Screen Shot tool - VB.NET also here is how to capture mouse position

Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles MyBase.MouseMove
Label1.Text = "X." & e.X & vbCrLf & "Y." & e.Y
End Sub

To get keypress events here a link to this Actual Forum http://www.vbdotnetforums.com/windows-forms/3030-form-keypress-detecting.html

theirs the Resource for what you would need, you just have to write it in your windows Application to the way you want, oh yes you'll need to change this to the way you need it but this is how to save the captures using a Loop itterating by 1

If FileIO.FileSystem.DirectoryExists(sPaths) Then
tmrREC.Interval = trkSpeed.Value
intz = intz + 1
picCapture.Image = CaptureScreen()
picCapture.Image.Save(sPaths & "PicCap-" & Format(intz, "00") & ".jpg")
Else
MkDir(sPaths)
End If

im sure this is more than enough, i hope this helps.

PS.
Timer function would not be needed if your using mouse move and keypress events, but you could still implement one if you need it.
 
Back
Top