Open the creation/edit wizard of a form and navigate to the tab Behaviour:



Select a procedure of the library from the combobox corresponding to the event you want to manage.