T
TaeHo Yoo
I am trying to copy a string in a text box into clipboard and what I did
was
Imports System.Windows.Forms
and
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Clipboard.SetDataObject(TextBox1.Text, True)
End Sub
but this generates an error saying
-----------------------------------------------------
The current thread must set to Single Thread Apartment (STA) mode before
OLE calls can be made. Ensure that your Main function has
STAThreadAttribute marked on it.
-----------------------------------------------------
Any idear what this means?
Could you help me?
Thanks in advance.
was
Imports System.Windows.Forms
and
Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles Button1.Click
Clipboard.SetDataObject(TextBox1.Text, True)
End Sub
but this generates an error saying
-----------------------------------------------------
The current thread must set to Single Thread Apartment (STA) mode before
OLE calls can be made. Ensure that your Main function has
STAThreadAttribute marked on it.
-----------------------------------------------------
Any idear what this means?
Could you help me?
Thanks in advance.