這個問題我卡了很久了.....= =
想請問有沒有人知道解決的方法 謝謝
我有一個 winform 上面放了TreeView
當我在建立TreeView的TreeNode 的時候..因為node的數量比較多
所以再建立的時候整個程式就被凍結住了 看起來就像當掉一樣
我本來考慮新增 一個Thread 去建立TreeView
但是這樣會出現警告..
Action being performed on this control is being called from the wrong thread.
Marshal to the correct thread using Control.Invoke or Control.BeginInvoke to
perform this action.
這個警告 看起來像是因為TreeView 正在 Main Thread裡面..
所以這個新增的Thread沒辦法 去更改TreeViw (不知道我有沒有誤解他的意思)
如果不能新增一個Thread去 跑TreeView的話
那請問什麼方法
可以讓TreeView在建立的時候不會 把整個From都當住
麻煩各位給我建議了
感謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 140.109.19.9
推
06/04 19:19, , 1F
06/04 19:19, 1F
→
06/04 19:27, , 2F
06/04 19:27, 2F
→
06/04 19:36, , 3F
06/04 19:36, 3F
→
06/04 19:36, , 4F
06/04 19:36, 4F
→
06/04 20:24, , 5F
06/04 20:24, 5F
→
06/04 20:26, , 6F
06/04 20:26, 6F
→
06/04 20:27, , 7F
06/04 20:27, 7F
→
06/04 20:28, , 8F
06/04 20:28, 8F
→
06/04 20:28, , 9F
06/04 20:28, 9F
→
06/04 20:29, , 10F
06/04 20:29, 10F
→
06/04 20:29, , 11F
06/04 20:29, 11F