var oForm = pMe.Form; oForm.AddEvent("onOpen", "sFuncId", onTest); function onTest(ev) { Pm.Debug("onOpen"); }