cancel
Showing results for 
Search instead for 
Did you mean: 

How to access Clipoard Data in B1-Addon Application ?

Former Member
0 Kudos

Dear ,

i want to access the global clipboard data , how can i do it ?

In Windows Application , i can access the clipboard without any problem by using



Clipboard.GetDataObject()

OR

My.Computer.Clipboard

.....but if i am going to write this above code on B1 Add-on , it fail

Thanks

Gordon

Accepted Solutions (1)

Accepted Solutions (1)

Former Member
0 Kudos

Im using

My.Computer.Clipboard.GetText() and inside addon it works - in 2007.

Former Member
0 Kudos

i know the problem right now , while i put the code within the item event , it show nothing

is there any way to fix it ?

Gordon

Thanks

Gordon

Edited by: Gordon Ho on Jul 30, 2008 5:37 AM

Former Member
0 Kudos

Working with clipboard is possible only in single thread classes defined with correct stathreadattribute.

Item event isnt single, so you cannot use it directly. Solution for you is define new class with stathreadattribute and inside itemevent call methods inside this class. Try to search in google for stathreadattribute and clipboard, youll find a lot of examples (I dont have acces now to my source codes to send it you directly).

Former Member
0 Kudos

Hi all,

Could anyone please provide an example?

I'm having the same problem using the clipboard text in event handler.

Thanks in advance!

Kind regards,

Hans

Answers (0)