Hey guys! I have a (super specific) question about CAT's `ClientManager.GetForegroundWindow()` function, specifically about calling it on a separate thread than a program's UI thread.
In order to speed up my program's load time, I'd like to put very little initial processing in the `load` event. Instead, I'd like to just pass all initial processing (which should happen on load) to a background worker thread, as seen below:
Public Sub Form1_Load(sender As Object, e As EventArgs) Handles MyBase.Load BackgroundWorker1.RunWorkerAsync() End Sub
However, what I'm finding is that I can't call `ClientManager.GetForegroundWindow()` from the separate thread. If I do, it seems to silently fail (no exceptions, just nothing happens). Other CAT calls work fine from the seperate thread.
Any ideas on how I can get the foreground window, from a separate thread? Thanks!