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. WPF
  4. Executes a delegate on the thread that owns the control's underlying window handle

Executes a delegate on the thread that owns the control's underlying window handle

Scheduled Pinned Locked Moved WPF
csharpwpfcomhelpquestion
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.
  • C Offline
    C Offline
    cppwxwidgetsss
    wrote on last edited by
    #1

    Hi I want to use this lovely code in a WPF app but there is no Invoke method for WPF's TextBox so I have a run time error which say that the SerialPort's Thread is trying to change the TextBox that owns to another thread anybody have any idea? here is the code(article), I am talking about: http://www.codeproject.com/KB/cs/virtualports.aspx?msg=3291065#xx3291065xx

    I 1 Reply Last reply
    0
    • C cppwxwidgetsss

      Hi I want to use this lovely code in a WPF app but there is no Invoke method for WPF's TextBox so I have a run time error which say that the SerialPort's Thread is trying to change the TextBox that owns to another thread anybody have any idea? here is the code(article), I am talking about: http://www.codeproject.com/KB/cs/virtualports.aspx?msg=3291065#xx3291065xx

      I Offline
      I Offline
      Ian Shlasko
      wrote on last edited by
      #2

      The Invoke method in WPF was moved to the Dispatcher object, which can be accessed via the Dispatcher property on the TextBox.

      Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)

      C 1 Reply Last reply
      0
      • I Ian Shlasko

        The Invoke method in WPF was moved to the Dispatcher object, which can be accessed via the Dispatcher property on the TextBox.

        Proud to have finally moved to the A-Ark. Which one are you in? Author of Guardians of Xen (Sci-Fi/Fantasy novel)

        C Offline
        C Offline
        cppwxwidgetsss
        wrote on last edited by
        #3

        thank you very much I was really confused

        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