码迷,mamicode.com
首页 > 编程语言 > 详细

vb.net多线程

时间:2014-08-27 18:08:28      阅读:202      评论:0      收藏:0      [点我收藏+]

标签:style   blog   color   for   ar   art   div   log   sp   

 

 

Public Class Form1

    Dim myThread As Threading.Thread
    Public Delegate Sub SetTextStringDelegate(ByVal tb As TextBox, ByVal str As String)
    Public Sub SetTextStringInvoke(ByVal tb As TextBox, ByVal str As String)
        tb.Text = str
    End Sub

    Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click
        myThread = New Threading.Thread(AddressOf SetTextString)
        myThread.Start()
    End Sub
    Private Sub SetTextString()

        TextBox1.Invoke(New SetTextStringDelegate(AddressOf SetTextStringInvoke), New Object() {TextBox1, "多线程访问界面"})


    End Sub


End Class

 

vb.net多线程

标签:style   blog   color   for   ar   art   div   log   sp   

原文地址:http://www.cnblogs.com/ike_li/p/3939832.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!