Hee Lim,
Form1 is just an example. You have to make the form public to assess the forms controls and methods as On Key Label is not accessed from inside the form itself.
For example, where form1 is the name of your form
public form1
form1 = createobject(classform)
define class classform as form
enddefine
if you want, i can send you a sample code.