I am not sure how to explain this, but here goes: I have a form with a grid with some comboboxes. From this form I create another to edit data. The edit form has also some of the comboboxes like the grid. The values in these comboboxes can be edited from a third form. If they are edited I send a broadcast like message to all open forms to update the comboboxes.
procedure HsBrodcastUpdate;
var
i: integer;
begin
for i := 1 to Screen.FormCount - 1 do
SendMessage(Screen.Forms[i].Handle, WM_FORMUPDATES, 0, 0);
end;
On each form where updates should be performed I have:
procedure FormUpdate(var aMessage: TMessage); message WM_FORMUPDATES;
This is like using a shootgun when a riffle would be enough. It should be enough to send the message to the form where the editform was created from
I am not sure if it would give any performance boost but I would like to try.
My question: How can I instead of using HsBrodcastUpdate that sends to all forms just send the message to the form that created the form that sends the message.