Run multiple UI Threads

后端 未结 4 425
没有蜡笔的小新
没有蜡笔的小新 2020-11-28 11:10

Skip to the bottom for the question; this is just some extra info

I am using a component (GeckoFX) to render some websites, well fine, yet it can only be us

4条回答
  •  生来不讨喜
    2020-11-28 11:18

    Seems like it is possible.

    I took backgrounder, opened TestApp, and created a new Form1 on thread/message pump #2:

    private void button2_Click(object sender, EventArgs e) {
        helper.Background(() => {
            Form1 form2 = new Form1();
            form2.Show();
        });
    }
    

    The second window responds to mouse clicks etc.

    Haven't actually verified if everything looks right, the freebie Visual Studio Express Edition I'm using is missing the "Threads" debug window, ahem. So I'm a bit in the dark. It seems to work, though. Let me know :-).

提交回复
热议问题