Call the InitializeDatabaseSchemaTree asynchronously
I have a tabbed form: one tab with the text box (opens first) and the other tab has the query builder. usually, when the user opens the form he gets the text box and immediately begins to type the SQL. later he may or may not move to the visual query builder.
This means it doesn't make sense to call InitializeDatabaseSchemaTree() and make him wait while the meta data is loading. But then, I do want the auto-complete on the text box, which is dependent upon InitializeDatabaseSchemaTree() finishing.
My question is: can it be done asynchronously? Can I just let him type as the form opens, then call InitializeDatabaseSchemaTree in the background (on some thread I guess) and then have the user see the autocomplete as soon as it's done, while he's already busy typing the SQL?
and if so, is there a code sample anywhere? I couldn't find it