Facebook Sharer
选择您要替换的背景颜色:
【农历新年】背景图片:
个性化设定
 注册  找回密码
查看: 1677|回复: 0
打印 上一主题 下一主题

Multi Thread(s) in vb.net

[复制链接]

62

主题

5

好友

3715

积分

本站名嘴

Rank: 11Rank: 11

跳转到指定楼层
1#
发表于 2009-6-1 11:51 AM |只看该作者 |倒序浏览
Imports System.Threading
...
' This value is incremented by all threads.
Public Value As Integer = 0

Private Sub btnStartThread_Click(ByVal sender As _
    System.Object, ByVal e As System.EventArgs) Handles _
    btnStartThread.Click
    ' Make a new counter object.
    Static thread_num As Integer = 0
    Dim new_counter As New Counter(Me, thread_num)
    thread_num += 1

    ' Make a thread to run the object's Run method.
    Dim counter_thread As New Thread(AddressOf _
        new_counter.Run)

    ' Make this a background thread so it automatically
    ' aborts when the main program stops.
    counter_thread.IsBackground = True

    ' Start the thread.
    counter_thread.Start()
End Sub

http://www.vb-helper.com/howto_net_run_threads.html




收藏收藏0
您需要登录后才可以回帖 登录 | 注册

JBTALKS.CC |联系我们 |隐私政策 |Share

GMT+8, 2024-12-1 07:27 PM , Processed in 0.093266 second(s), 27 queries .

Powered by Discuz! X2.5

© 2001-2012 Comsenz Inc.

Ultra High-performance Dedicated Server powered by iCore Technology Sdn. Bhd.
Domain Registration | Web Hosting | Email Hosting | Forum Hosting | ECShop Hosting | Dedicated Server | Colocation Services
本论坛言论纯属发表者个人意见,与本论坛立场无关
Copyright © 2003-2012 JBTALKS.CC All Rights Reserved
合作联盟网站:
JBTALKS 马来西亚中文论坛 | JBTALKS我的空间 | ICORE TECHNOLOGY SDN. BHD.
回顶部