ok, I just had the same problem with my samsung s2 (Galaxy II). I was going in and out of programs to see how/ what they are.
I discovered how to disable the screen lock by re-entering - settings, security, enter the screen lock and enter another code, then hit next, you will then be able to click "NONE". This will disable the screen lock.
Good Luck.