المساعد الشخصي الرقمي

مشاهدة النسخة كاملة : make Invoke from main thread to secondary



C# Programming
06-06-2012, 12:40 PM
I have a component for playing, which, unfortunately, work in current thread. So, when i have an action in main thread, which duration more than player buffer, i have a delay in playing. I want to create this component in secondary thread. But if i call Start or Stop playing from main thread, it fall with exception or hang. So i need to call this component from this secondary thread(maybe with invoke or something else). How can i do this?