As an option: if your code is really independent of the form, create a data module, place a TActionList on it, add a data block to the uses clause, assign actions to the Action property of the control (in this case, you can simply copy the control from one form to another) or calling this action from an event (in this case you need to edit the code, but the event handler will contain only one line of code)
source share