Robofun 機器人論壇

 找回密碼
 申請會員
搜索
熱搜: 活動 交友 discuz
查看: 4060|回復: 4
打印 上一主題 下一主題

Roboard + XPE 跑thread會當

[複製鏈接]
跳轉到指定樓層
1#
發表於 2010-9-13 00:14:45 | 顯示全部樓層 回帖獎勵 |倒序瀏覽 |閱讀模式
最近用xpe跑我寫的vb.net,裡面跑一個thread然後就會當機~~~
不知有沒有解?


  1.     Private engineThread As Thread
  2.     Private Sub RunIKEngine()
  3.         Dim a As Long = 0
  4.         Do While True
  5.             a += 1
  6.             SetLabel4(a.ToString)
  7.         Loop
  8.     End Sub

  9.     Private Sub StartThread()
  10.         'Create a thread that will the RunHexEngine method in the background.
  11.         engineThread = New Thread(AddressOf RunIKEngine)
  12.         engineThread.IsBackground = True
  13.         engineThread.Start()
  14.     End Sub
複製代碼
2#
 樓主| 發表於 2010-9-14 09:24:28 | 顯示全部樓層
  1.     Delegate Sub SetTextBox1Callback(ByVal [text] As String)
  2.     Private Sub SetLabel4(ByVal [text] As String)
  3.         If Me.Label4.InvokeRequired Then
  4.             Dim del As New SetTextBox1Callback(AddressOf SetLabel4)
  5.             Me.Invoke(del, New Object() {[text]})
  6.         Else
  7.             Me.Label4.Text = [text]
  8.         End If
  9.     End Sub
複製代碼
3#
 樓主| 發表於 2010-9-16 07:54:04 | 顯示全部樓層
謝謝m大,那我再試試看吧~~謝謝
您需要登錄後才可以回帖 登錄 | 申請會員

本版積分規則

小黑屋|手機版|Archiver|機器人論壇 from 2005.07

GMT+8, 2024-5-16 13:46 , Processed in 0.227610 second(s), 7 queries , Apc On.

Powered by Discuz! X3.2

© 2001-2013 Comsenz Inc.

快速回復 返回頂部 返回列表