Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Visual Basic
  4. Cross threading in class library

Cross threading in class library

Scheduled Pinned Locked Moved Visual Basic
helpcsharpasp-nettutorial
4 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MAP Tiger
    wrote on last edited by
    #1

    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. Thanks

    MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

    C 1 Reply Last reply
    0
    • M MAP Tiger

      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. Thanks

      MAP Tiger Tiger Softwares Software Designer and Developer VB.NET, ASP.NET, VFP

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      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.

      M 1 Reply Last reply
      0
      • C Christian Graus

        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.

        M Offline
        M Offline
        MAP Tiger
        wrote on last edited by
        #3

        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

        M 1 Reply Last reply
        0
        • M MAP Tiger

          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

          M Offline
          M Offline
          MAP Tiger
          wrote on last edited by
          #4

          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 and ChangeText procedure do the work needed with SongName 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

          1 Reply Last reply
          0
          Reply
          • Reply as topic
          Log in to reply
          • Oldest to Newest
          • Newest to Oldest
          • Most Votes


          • Login

          • Don't have an account? Register

          • Login or register to search.
          • First post
            Last post
          0
          • Categories
          • Recent
          • Tags
          • Popular
          • World
          • Users
          • Groups