DEFINE CLASS MyButton AS CommandButton PROCEDURE Click() thisform.DoSomething(parameter) ENDPROC ENDDEFINEthen look in Metin code, but instead of CommandButton use MyButton
thisform.NewObject("Button1", "MyButton", "MyClassLibrary.PRG(VCX)")add a method in the form called DoSomethig with parameter list & after the user click some of the buttons that method will be fired.