Windows Service & Clipboard

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • =?Utf-8?B?SHVtYW0=?=

    Windows Service & Clipboard

    I am developing a windows service that read data from a device attached to a
    PC via serial port, then service should put the data in the clipboard.
    I am writing this code:

    Clipboard.Clear ();
    Clipboard.SetTe xt("Some Text");

    but for some reason, no data is sent to the clipboard!
    Is it because Windows Service run on a seperate thread?
    Can any one help?

  • Mr. Arnold

    #2
    Re: Windows Service & Clipboard


    "Humam" <Humam@discussi ons.microsoft.c omwrote in message
    news:D4858622-BE47-40AB-AC44-05367ECC81D4@mi crosoft.com...
    >I am developing a windows service that read data from a device attached to
    >a
    PC via serial port, then service should put the data in the clipboard.
    I am writing this code:
    >
    Clipboard.Clear ();
    Clipboard.SetTe xt("Some Text");
    >
    but for some reason, no data is sent to the clipboard!
    Is it because Windows Service run on a seperate thread?
    Can any one help?
    >
    I would think because it's not a Windows Desktop solution, forms based, that
    you might have a problem doing that.

    Comment

    Working...