ASync and CenterMDI

49 views
Skip to first unread message

Steve Burrows

unread,
May 6, 2025, 5:05:53 AMMay 6
to Migrated By Firefly
When opening a new form on a fresh thread, it always appears in the center of Monitor 1 reagrdless of where the MDI is.

Called with :
pleaseWaitA = new PleaseWaitASync()

Snippet from  PleaseWaitASync that defines the Form Properties  :
            _t = new System.Threading.Thread(() =>
            {
                var f = new fPleaseWait();
                f.Text = title;
                f.StartPosition = Firefly.Box.UI.WindowStartPosition.CenterMDI;

Any way for it to find the correct MDI Location, or to launch it a different way (it has no Methods so cant use Create<>) ?

Steve Burrows

unread,
May 6, 2025, 12:21:39 PMMay 6
to Migrated By Firefly
Got something working with a rather bizarre method by converting a Windows.Forms.FormStartPosition instead of using the FF options.
                f.StartPosition = (Firefly.Box.UI.WindowStartPosition)FormStartPosition.CenterParent;

Its not quite CenterMDI, but at least its on the correct monitor. Result!

Reply all
Reply to author
Forward
0 new messages