I'm not sure I really understand the question?
Are you asking if its possible to use a code to unlock the lockscreen instead of the default slide pattern / slide down / slide right? If so yes, go to settings, security, set up screen lock and choose PIN (if on 2.2 froyo).
If that's not the question please explain and ill try and understand

....