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. C#
  4. problem with Threading

problem with Threading

Scheduled Pinned Locked Moved C#
csharphelpquestion
3 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.
  • E Offline
    E Offline
    ekynox
    wrote on last edited by
    #1

    G'day folks, I just implemented a winform containing a listview. The listview simply lists all the files present in a directory with the name and its respective icon in one column. As I was trying to get an understanding on how Win32.SHGetFileInfo works. The process of actually adding the information was done via a separate thread. What I had discovered that if one of my files contained an outlook message file, it will not display the icon for outlook instead it displays the generic windows icon. The generic windows icon is the same as when windows os cannot seem to associate an application with a file. Now if I were to display the files and its respective icon in the listview without the assistance of a thread, the outlook icon appears in the listview. So far it works fine with any other file ie. txt, word, excel etc. The samething happens with .net 1.1 and 2.0 Anyone got any ideas as to why this would be happening ? thanks

    S 1 Reply Last reply
    0
    • E ekynox

      G'day folks, I just implemented a winform containing a listview. The listview simply lists all the files present in a directory with the name and its respective icon in one column. As I was trying to get an understanding on how Win32.SHGetFileInfo works. The process of actually adding the information was done via a separate thread. What I had discovered that if one of my files contained an outlook message file, it will not display the icon for outlook instead it displays the generic windows icon. The generic windows icon is the same as when windows os cannot seem to associate an application with a file. Now if I were to display the files and its respective icon in the listview without the assistance of a thread, the outlook icon appears in the listview. So far it works fine with any other file ie. txt, word, excel etc. The samething happens with .net 1.1 and 2.0 Anyone got any ideas as to why this would be happening ? thanks

      S Offline
      S Offline
      S Senthil Kumar
      wrote on last edited by
      #2

      Did you use Control.Invoke[^] or BeginInvoke to update the treeview from the other thread? If not, you must use it, this[^] article describes why. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

      E 1 Reply Last reply
      0
      • S S Senthil Kumar

        Did you use Control.Invoke[^] or BeginInvoke to update the treeview from the other thread? If not, you must use it, this[^] article describes why. Regards Senthil _____________________________ My Blog | My Articles | WinMacro

        E Offline
        E Offline
        ekynox
        wrote on last edited by
        #3

        thanks for the reference. I always saw BeginInvoke but didnt realise what it did till now.

        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