Trick to lock files using Visual Basic programming

This technique is often used by the virus maker, the aim is that the virus can not be removed. But this time I share this trick is not to create a virus, but an alternative way how to lock the files so that others cannot be remove or modify your important files.

This is just an example, you can develop it to suit your needs. Explanation and example code is as follows:
1. Open your Visual Basic application.
2. Create a new project.
3. Add a textbox to the form.

4. Double click on "Form" to open the code screen.
___________________________________

Private Sub Form_Load()
On Error Resume Next
Open Text1.Text For Input As 1
End Sub
___________________________________
Copy the code above

5. To make applications invisible at the screen and task manager, set the properties as shown below:

ShowInTaskbar = False
Visible = False

Windows 7 probably not need this method, because the security system has been perfected (but may be used for preventive).

Note: Only for Windows NT family
 

Keyword: How to lock files | Lock Files | Lock Files Code | Lock Files Code in Visual Basic | Visual Basic Lock File Code

You may also like: