It would be better if the setting buttons did not trigger the recalculation, and it waited until you clicked a button to start. It also will recalculate if the window needs redrawing. This could be improved. For one thing, it belongs in its own thread so that it is easy to stop it. This one will search all lags of all PRNs.
Same things apply here.
If you use a large width value in this one, be prepared to wait a long time. This one doesn't run until you click the Search button. It still needs to be in its own thread. Once it finishes its calculations it saves them, so further window redraws don't trigger a recalculation. When it is done it shows the best correlation found for each PRN code.