I have the Mainwindow running on its own UI single STA thread. AT some point in the application I am running, for limited time, another window on a different single STA thread. The problem I am having is that the second tread runs on a different location on the screens, which outside the boundaries of the MainWindow. I would like to re-position the second thread over the MainWindow.
Thank you in advance!
Found myself the solution. I wanted to put the second thread right in the center of UI thread (first thread). I had to calculate the desired location in the UI thread, and pass it as an argument to a Sub in the second thread, and use it after showing the window and Start/Run the second thread.
Getting the location in the first thread:
Passing the location as argument:
In the second thread:
To close the thread, use the following in the first/UI thread:
Be loved!