Can you possibly be a bit more specific than "the sample has refused to
work so far"please?
Are there any error messages? What happens that shouldn't ... what doesn't
happen that should ... do you see any smoke coming out of the keyboard ;- )
?
There's quite a bit of code at the link you gave ... Which bit are we
talking about? How have you adjusted it for your application? Have you tried
stepping through the code and checking variable values or which bits of code
are being executed?