Current thread must be set to single thread apartment (STA)


Author
Message
Mike O'Ceirin
Mike O'Ceirin
Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)Forum Newbie (3 reputation)
Group: Forum Members
Posts: 22, Visits: 184
I am trying to put a chart image into the clipboard. It seems it requires single threading how do I implement this? It occurs in debug mode and also occurs when the asp.net project is published on the net. How can I implement it please.
I get the message in the subject line when I try to run the following code
   protected void ChartClip_Click(object sender, EventArgs e)
   {
    NImageExporter imageExporter = this.chartControl.ImageExporter;
    imageExporter.CopyToClipboard(imageExporter.DefaultImageSize, NResolution.ScreenResolution, new NJpegImageFormat());
   }

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...





Similar Topics

Reading This Topic

Login

Explore
Messages
Mentions
Search