I have this application in Delphi that has two forms one has a grid and another one has a map. Once you click in the grid the location of the vehicle is displayed on the map.

My problem is every time I update the location in the map this map form gets the focus, what do I need to do to call a procedure in the second form without lose the focus in the first one, avoiding this way the visual effects that windows have on change of focus.

I did some research and I find lots about creating and closing forms but noting about updating the form.

Thanks,

有帮助吗?

解决方案

Normally, simply calling code in the second form won't set focus to it. So there is something in particular that you are doing, or that a control on the second form is doing that is setting focus to that form.

I would look in the second form for things like SetFocus, Show, etc that may be being called when you update the map.

许可以下: CC-BY-SA归因
不隶属于 StackOverflow
scroll top