try this

addhandler yourbuttonname.click, new system.eventhandler(addressOf the_function_that_you_want_to_call_when_pressing_the_button)