真实的国产乱ⅩXXX66竹夫人,五月香六月婷婷激情综合,亚洲日本VA一区二区三区,亚洲精品一区二区三区麻豆

成都創(chuàng)新互聯(lián)網(wǎng)站制作重慶分公司

vb點(diǎn)虐 多線程類 vbs 多線程

在vb點(diǎn)虐 中,多線程如何使用

Sub Main() Dim thr As New Thread(AddressOf 循環(huán)) thr.Start("a") End Sub Sub 循環(huán)(a() As String) '這里隨你干什么循環(huán)也行 For Each i As String In a MsgBox(i) Next End Sub

按需策劃可以根據(jù)自己的需求進(jìn)行定制,做網(wǎng)站、網(wǎng)站設(shè)計(jì)構(gòu)思過程中功能建設(shè)理應(yīng)排到主要部位公司做網(wǎng)站、網(wǎng)站設(shè)計(jì)的運(yùn)用實(shí)際效果公司網(wǎng)站制作網(wǎng)站建立與制做的實(shí)際意義

VB點(diǎn)虐 如何設(shè)計(jì)多線程運(yùn)行

Sub Main()

Dim thr As Thread

For Pi As Integer=0 To 4 //啟用5線程

MulParams =Pi vbTab sFile vbTab dFile vbTab 1 vbTab DelN vbTab cr vbTab cg vbTab cb vbTab IndexI

GlobalParamas(pi)=MulParams .Split(vbTab)

thr=New Thread(AddressOf MyMulThreadCaller)

thr.Start() //啟動(dòng)多線程進(jìn)程

Application.DoEvents

Next

End Sub

vb點(diǎn)虐 多線程如何返回參數(shù),舉個(gè)例子,謝謝

Public?Class?Form1

Public?Class?SquareClass?'把多線程調(diào)用的函數(shù)封裝到類中,通過類事件返回

Public?Value?As?Double

Public?Square?As?Double

Public?Event?ThreadComplete(ByVal?Square?As?Double)

Public?Sub?CalcSquare()

Square?=?Value?*?Value

RaiseEvent?ThreadComplete(Square)

End?Sub

End?Class

Dim?WithEvents?oSquare?As?SquareClass

Private?Sub?Button1_Click(sender?As?Object,?e?As?EventArgs)?Handles?Button1.Click?'多線程返回值測(cè)試,當(dāng)線程運(yùn)行完成激發(fā)事件

oSquare?=?New?SquareClass()

Dim?t?As?New?Threading.Thread(AddressOf?oSquare.CalcSquare)

oSquare.Value?=?30

t.Start()

End?Sub

Sub?SquareEventHandler(ByVal?Square?As?Double)?Handles?oSquare.ThreadComplete?'響應(yīng)事件函數(shù)

MsgBox("The?square?is?"??Square)

End?Sub

End?Class


網(wǎng)站名稱:vb點(diǎn)虐 多線程類 vbs 多線程
文章源于:http://weahome.cn/article/ddsdhco.html

其他資訊

在線咨詢

微信咨詢

電話咨詢

028-86922220(工作日)

18980820575(7×24)

提交需求

返回頂部