Hi,
To lock the code, so that no one else can change without your knowledge, follow these steps.
Open the VI, Select 'VI Properties' from the 'File' menu.
Choose 'Security' from the Categories in the drop down menu on VI properties dialog.
Choose the level of security for your VIs(unlocked by default, locked and password protected).
Just a thought abt your other problem. Try storing the control values at the end of each run or before quitting the VI, to a .txt or .ini file. Modify your VI, so that the firt step is to read the values from that saved file and update the controls.
Deepak