PUBLIC oform1 oform1=NEWOBJECT("form1") oform1.Show RETURN DEFINE CLASS form1 AS form DoCreate = .T. Caption = "Form1" Name = "Form1" ADD OBJECT text1 AS textbox WITH ; Height = 23, ; Left = 48, ; Top = 84, ; Width = 100, ; Name = "Text1" ADD OBJECT text2 AS textbox WITH ; Height = 23, ; Left = 216, ; Top = 84, ; Width = 100, ; Name = "Text2" PROCEDURE onkeypress LPARAMETERS nKeyCode, nShiftAltCtrl DEBUGOUT PROGRAM(), nKeyCode, nShiftAltCtrl ENDPROC PROCEDURE Init BINDEVENT(Thisform.Text1, "KeyPress", Thisform, "OnKeyPress") BINDEVENT(Thisform.Text2, "KeyPress", Thisform, "OnKeyPress") ENDPROC PROCEDURE text1.KeyPress LPARAMETERS nKeyCode, nShiftAltCtrl DEBUGOUT PROGRAM(), nKeyCode, nShiftAltCtrl ENDPROC PROCEDURE text2.KeyPress LPARAMETERS nKeyCode, nShiftAltCtrl DEBUGOUT PROGRAM(), nKeyCode, nShiftAltCtrl ENDPROC ENDDEFINE