Group: StrataFrame Developers
Posts: 6.6K,
Visits: 6.9K
|
Well, the message pump may not have completed before the scroll bars are fully initialized. I have seen stuff like this before on different machines when there is, as you are dealing with, a threading issue. Generally, I will move the loading logic to a thread safe location after all initialization logic has taken place on the core controls.
A semi-no-so-clean way to test this is to create a timer and drop it on the form and set it to something like 2-3 seconds. Let this trigger your logic and see if the problem persists. If not, then you know that the controls were not fully initialized and that a threaded conflict occurred. In this case, you can just move the loading logic further downstream until you resolve it. For example, override the OnLoad event of the form, call the base logic, then call your logic. If that doesn't work, move to the OnShown, etc.
|