Results 1 to 4 of 4

Thread: [VB.Net 2005] Clipboard in Windows Mobile..!!?

  1. #1

    Thread Starter
    Junior Member PC Master's Avatar
    Join Date
    Aug 2006
    Location
    At Home
    Posts
    17

    Question [VB.Net 2005] Clipboard in Windows Mobile..!!?

    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

    "Software & Hardware User"

    "Car User"

  2. #2
    Frenzied Member
    Join Date
    Oct 2005
    Posts
    1,286

    Re: [VB.Net 2005] Clipboard in Windows Mobile..!!?

    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
    Pete Vickers
    MVP - Device Application Development
    http://www.gui-innovations.com http://mobileworld.appamundi.com/blogs/

  3. #3

    Thread Starter
    Junior Member PC Master's Avatar
    Join Date
    Aug 2006
    Location
    At Home
    Posts
    17

    Re: [VB.Net 2005] Clipboard in Windows Mobile..!!?

    thanks.. i've tried this before but didn't work

    thanks anyway

    "Software & Hardware User"

    "Car User"

  4. #4

    Thread Starter
    Junior Member PC Master's Avatar
    Join Date
    Aug 2006
    Location
    At Home
    Posts
    17

    Re: [VB.Net 2005] Clipboard in Windows Mobile..!!?

    thanks i found out what's the problem..

    the problem with (Paste from Clipboard) option

    Code:
    text1.Text = Clipboard.GetDataObject()
    will return the data as (Object) not (Text or String)

    so the code must be like this:

    Code:
    Text1.Text = Clipboard.GetDataObject.GetData(System.Windows.Forms.DataFormats.Text, True)
    so we convert the clipboard to string or text
    Last edited by PC Master; Aug 18th, 2007 at 02:01 PM.

    "Software & Hardware User"

    "Car User"

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width