如何加载完全独立于母班的班级 [英] How to load a class totally independent from the mother class

查看:66
本文介绍了如何加载完全独立于母班的班级的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

你好

我有一个需要创建另一个类的类(从窗口继承).
第二个类在新打开的窗口中构建一组控件.

因为构建第二个新类的过程相当长

我需要在不同的线程中打开这个新窗口

我正在尝试这样做与backgroundworker一起使用,但是新类开始构建界面(文本框等)后,
就会产生一个错误,指出该线程必须是静态的


最好

Hello

I have a class that needs to create  another class (that inherit from window).
This second class build a set of controls in a new open window.

Because the process of building this new second class it quite long

I need to open this new window in a different thread

I am trying to do this with a backgroundworker but as soon as the new class starts to build the interface (textboxes etc)
it casts an error saying that the thread must be static


Which is the best technique to achieve this?

推荐答案

是要显示的启动画面还是什么?

是的...启动线程必须成为< statTHREAD> ....
Is it a splashscreen you want to show or what?

And yes ... a startup thread must be a <statTHREAD> ....


这篇关于如何加载完全独立于母班的班级的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆