URGENT : clipbrd access in No-Touch deployed application

  • Thread starter Thread starter rs_tiin
  • Start date Start date
R

rs_tiin

Hi
We are having an application(a custom grid control
development) in which we are using a clipboard
system.windows.forms.clipboard.setdataobject. This works
fine at the time of development.

however when we deploy it using No-Touch, and run the app
on the deployed machines. we gert a weird error. it
says

"The current thrwead musty be set to STA mode before OLE
calls can be made. Ensure that your main function has
STAThreadAttribute" marked on it"
do note that the main method is already marked with as
STAThread, which was by default, anyways...

any hands???

regards,

sr
 
Hi
Try this:

[STAThread] <--- Add in this line
public static void Main()
{
.....
}


Gary
 
Hi

As mentioned in my original post

">> do note that the main method is already marked with as

it is already marked that way!!!


regards,

sr
-----Original Message-----
Hi
Try this:

[STAThread] <--- Add in this line
public static void Main()
{
.....
}


Gary

"(e-mail address removed)"
Hi
We are having an application(a custom grid control
development) in which we are using a clipboard
system.windows.forms.clipboard.setdataobject. This works
fine at the time of development.

however when we deploy it using No-Touch, and run the app
on the deployed machines. we gert a weird error. it
says

"The current thrwead musty be set to STA mode before OLE
calls can be made. Ensure that your main function has
STAThreadAttribute" marked on it"
do note that the main method is already marked with as
STAThread, which was by default, anyways...

any hands???

regards,

sr


.
 
Back
Top