>I would like to create a new toolbar button on the applications main toolbar and have it invoke a method on the active form. How do I set that up?
>
>I've been doing some investigation, but I'm not sure where I should put the code. Lets say I want to define a new method "mymethod"
>
>.statemanager.DefineAction('Form Mymethod', 'mymethod')
>
>Furthermore, once I get to that point, how will I enable & disable the button from the form level?
Steve,
If you want to have this method available to several forms throughout the application, the app object has a CreateStates() method for defining global state and actions. Put your DefineAction code there. Then, whenever the active form contains a method named mymethod, the button will be active. If the active form doesn't have the method, the button will be disabled.
HTH
_________________________________
There are 2 types of people in the world: