So, you've modified a form and added a button (not covered here)
Then, you've run Dag.exe against your GP installation
Then, you copied Application.MicrosoftDynamicsGP.ModifiedForms to your bin folder and set a reference to it
Now, we'll show you the code that will allow you to handle a custom button click. The code here is specific to one custom button added to one GP form, you'll have to edit those things for your form.