Cross threading in class library
-
Hi I am working with iTunes library. I am supposed to implement it into a class library. The problem is that to respond to events associated to iTunesApp I had to disable
CheckForIllegalCrossThreadCalls
but however in class library, this property isnt supported. Now, I am stuck in between and not able to figure out the solution. Please help me that how to enable Cross thread operations or how to call the event safely without compromising cross thread restriction. I would be very thankful for your kind response. ThanksMAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP
-
Hi I am working with iTunes library. I am supposed to implement it into a class library. The problem is that to respond to events associated to iTunesApp I had to disable
CheckForIllegalCrossThreadCalls
but however in class library, this property isnt supported. Now, I am stuck in between and not able to figure out the solution. Please help me that how to enable Cross thread operations or how to call the event safely without compromising cross thread restriction. I would be very thankful for your kind response. ThanksMAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP
Why are you cross posting about cross threading ? Actually, you don't need to disable that, although that's the easy solution. You need to fix your code so it doesn't make the illegal calls across threads.
Christian Graus Driven to the arms of OSX by Vista.
-
Why are you cross posting about cross threading ? Actually, you don't need to disable that, although that's the easy solution. You need to fix your code so it doesn't make the illegal calls across threads.
Christian Graus Driven to the arms of OSX by Vista.
Hi Again thanks for the reply. But dear it is not upto me to stop this behaviour of cross threading. As I mentioned that I am working with iTunes library. So when I try to grab an event of e.g. PlayEvent on windows forms then it cannot run anything until I disable the Check for illegal cross threading calls. I hope that I am much clearer now so that you can help me out for this. By the way cross posting is just that some dont come on VB.NET boards and some dont come on C# board and I am in hurry to get it fixed. I hope you dont mind it now. :) Regards,
MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP
-
Hi Again thanks for the reply. But dear it is not upto me to stop this behaviour of cross threading. As I mentioned that I am working with iTunes library. So when I try to grab an event of e.g. PlayEvent on windows forms then it cannot run anything until I disable the Check for illegal cross threading calls. I hope that I am much clearer now so that you can help me out for this. By the way cross posting is just that some dont come on VB.NET boards and some dont come on C# board and I am in hurry to get it fixed. I hope you dont mind it now. :) Regards,
MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP
Hi Thanks for the reply. I actually needed it in class library which will be basically hosted as a BHO to IE. Moreover, I have solved the problem and mentioning that here so may be useful for any other person.
SongName = "Artist: " + myTrack.Artist & " - Name: " + myTrack.Name
Dim myThread As New Thread(ChangeText)
myThread.Start()SongName
is defined on class level andChangeText
procedure do the work needed withSongName
Now the other question needs attention which is about invoking javascript function if someone can do help. Regards,MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP