开发者

Updating DataGrid View in Multithreaded Environment

开发者 https://www.devze.com 2022-12-21 13:39 出处:网络
I have set of c++ dlls and a c# exe . My c++ dlls are multi-threaded and they put data into a Database. My c# exe uses Background worker . My c# exe gets these data to a Data table asynchronously. To

I have set of c++ dlls and a c# exe . My c++ dlls are multi-threaded and they put data into a Database. My c# exe uses Background worker . My c# exe gets these data to a Data table asynchronously. To achieve this I am using named Mutex. My problem is when I assign this Data Table 开发者_开发知识库to my grid view It is crashing. I am using delegates and Begin Invoke .


With begin invoke do you mean myDelegate.BeginInvoke? you could try myForm.Invoke this runs the delegate on the UI Thread...

0

精彩评论

暂无评论...
验证码 换一张
取 消