how to copy string to clipboard in pocket pc?

  • Thread starter Thread starter Art
  • Start date Start date
A

Art

MSDN Doc. tells me to use this command :
textBox1.Copy()

But it doesn't work.
I'm not sure whether it is the command for pc or for ppc.

Any idea on it.
Thank you so much
 
1. Install the the OpenNetCF Smart Device Framework v1.0 here:

http://www.opennetcf.org/PermaLink.aspx?guid=3a013afd-791e-45ef-802a-4c1dbe1cfef9

2. In your .Net CF project in visual studios add a reference to the
"OpenNETCF.Windows.Forms" library

3. "Imports OpenNETCF.Windows.Forms"

4. Add this code:

Dim iData As IDataObject = Clipboard.GetDataObject()

Dim strTestClipBoard As String

'to set clipboard use the below code:

iData.SetData(DataFormats.Text.Trim, TextBox1.SelectedText) 'or whatever the
source is if you're setting the clipboard

'to GET clipboard use the below code:

strTestClipBoard = CType(iData.GetData(DataFormats.Text), String)



Andrew Jones
 
Thank you so much.
I'll try it


Andrew Jones said:
1. Install the the OpenNetCF Smart Device Framework v1.0 here:

http://www.opennetcf.org/PermaLink.aspx?guid=3a013afd-791e-45ef-802a-4c1dbe1cfef9

2. In your .Net CF project in visual studios add a reference to the
"OpenNETCF.Windows.Forms" library

3. "Imports OpenNETCF.Windows.Forms"

4. Add this code:

Dim iData As IDataObject = Clipboard.GetDataObject()

Dim strTestClipBoard As String

'to set clipboard use the below code:

iData.SetData(DataFormats.Text.Trim, TextBox1.SelectedText) 'or whatever the
source is if you're setting the clipboard

'to GET clipboard use the below code:

strTestClipBoard = CType(iData.GetData(DataFormats.Text), String)



Andrew Jones
 
Back
Top