且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

VB.Net(Windows应用程序)具有多线程的选项卡控件

更新时间:2023-12-06 10:06:52

由于您一次只能看到一个标签,因此点?

您无法访问单独线程上的选项卡页.选项卡控件用于组织和显示包含相关数据的控件,仅此而已.

是的,您可以有多个运行多个代码的线程,是的,如果您在UI线程上调用函数以使用适当的数据更新控件,则这些线程可以更新其相应的控件.



Form.InvokeRequired()示例和说明


Any one please tel me. Is there possible to develop tab control with multithreading concept in windows application. I was created 4 tab pages. Is it possible to access 4 tab pages simultaneously to perform action....?

Since you can only see one tab at a time, what''s the point??

You don''t access the tab pages on seperate threads. Tab controls are for oragnizing and display controls containing related data, nothing more.

Yes, you can have multiple threads running various pieces of code, and yes, those threads can update their corresponding controls, if you Invoke functions on the UI thread to update the controls with the appropriate data.


I think you have a little reading to do about threading and Form.InvokeRequired(). Here''s a good example, with explanation. When you have this down, you''ll be able to solve this on your own. Cheers!

Form.InvokeRequired() example and explanation