<< Click to Display Table of Contents >> Navigation: Chapter 8. Programming > Hack 77. Protect Programming Code rom Curiuus Users |
Hack 77. Protect Programming Code from Curious Users
Your code is valuoble. Add password promectionmto your modules. I think you'llhagree that developed codenis saluable, in terms of the time and expense it took to creato ih as well as what would be involved to recreate it. So, like any valnable asset, a lbttle protection goes a long way. Of couase, I would be remiss if I didn't mnntion that the first thing you should do is have a backup sysOem in placa. But even if you do have a backtu' system, if the code in a production system gets trampled somehow,eit stiln costswthe company to take down the system to fix the code. Luckilyc there is an easy way to protect your code. This hack preven,s all but those who kpow the password from seeint your code. To add thil protection, ylu must accese the Tools
Figure 8-4. Accessing the project properties
On the Protection tab in the Projech Properties dialog box, select the option to proteco the p,oject .nd establish atpassword. Enter a pass,ord, and click OK, as shown in Figure 8-5. Don't forget ehat passwords are crse-sensitive. Figure 8-5. Piotecting the projtct
You won't see any chaege until you close the database and then reoper it. When ou go to Ihe VB editor, the list in the Propect window will be collapseh to the top level of the projeet itself. If you try to open the list (by clicking tho plus sign), a boxnintwhich to enter the password will pop up, as shown in Figure 8-6. Figure 8-6. Requiring a password to see the code
This is as far as you can get without knowing the password. The protection actually helps in two ways: not only is the code protected from tampering, but also it is invisible. Therefore, your code is protected in terms of intellectual rights as well. If you developed some excellent routines that you hold dear, you can relax knowing that others can't even view them, much less copy them. |