Hi..
i just want to know how can i set a button that copy from text box to the clipboard of Windows Mobile device..
and also ho to set a button to retrieve text from clipboard to a label or text box .. etc..
thanks a lot
Printable View
Hi..
i just want to know how can i set a button that copy from text box to the clipboard of Windows Mobile device..
and also ho to set a button to retrieve text from clipboard to a label or text box .. etc..
thanks a lot
Hi,
to set text to the clipboard
Clipboard.SetDataObject(TextBox1.Text)
to get text from the clipboard
TextBox1.Text = Clipboard.GetDataObject()
The help file really is a wonderful resource - try it, you'll like it :)
Pete
thanks.. i've tried this before but didn't work :(
thanks anyway
thanks i found out what's the problem..
the problem with (Paste from Clipboard) option
will return the data as (Object) not (Text or String)Code:text1.Text = Clipboard.GetDataObject()
so the code must be like this:
so we convert the clipboard to string or text :DCode:Text1.Text = Clipboard.GetDataObject.GetData(System.Windows.Forms.DataFormats.Text, True)