PC Review


Reply
Thread Tools Rate Thread

Copying data from Clipboard for PocketPC 2003

 
 
Steve Payze via .NET 247
Guest
Posts: n/a
 
      16th Sep 2004
I am writing an application for a Pocket PC 2003 and want to retrieve some data from off the clipboard with Visual Basic .NET. The MSDN help gives the following:

Private Sub button2_Click(sender As Object, e As System.EventArgs)
' Declares an IDataObject to hold the data returned from the clipboard.
' Retrieves the data from the clipboard.
Dim iData As IDataObject = Clipboard.GetDataObject()

' Determines whether the data is in a format you can use.
If iData.GetDataPresent(DataFormats.Text) Then
' Yes it is, so display it in a text box.
textBox2.Text = CType(iData.GetData(DataFormats.Text), String)
Else
' No it is not.
textBox2.Text = "Could not retrieve data off the clipboard."
End If
End Sub 'button2_Click

When I build the project I keep getting the error 'error BC30002: Type 'IDataObject' is not defined.' I have added the statements
Imports System.Object
but this does not help. Any ideas ?


--------------------------------
From: Steve Payze

-----------------------
Posted by a user from .NET 247 (http://www.dotnet247.com/)

<Id>Qgxbd0c0VUmqDZ4mjrxCqQ==</Id>
 
Reply With Quote
 
 
 
 
Peter Foot [MVP]
Guest
Posts: n/a
 
      16th Sep 2004
Clipboard support is not included in .NETCF v1.0. However there is an
equivalent class in the OpenNETCF Smart Device Framework
(www.opennetcf.org/sdf/) this was designed to have an object model just like
the full .NET framework, however it currently only supports text. After
installing SDF, add a reference to OpenNETCF.Windows.Forms.dll and add
Imports OpenNETCF.Windows.Forms
to the top of your code file. Then you can call the Clipboard object and
associated classes as they work in your example below

Peter

--
Peter Foot
Windows Embedded MVP
www.inthehand.com | www.opennetcf.org

Do have an opinion on the effectiveness of Microsoft Windows Mobile and
Embedded newsgroups? Let us know!
https://www.windowsembeddedeval.com/...ity/newsgroups

"Steve Payze via .NET 247" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed)...
>I am writing an application for a Pocket PC 2003 and want to retrieve some
>data from off the clipboard with Visual Basic .NET. The MSDN help gives
>the following:
>
> Private Sub button2_Click(sender As Object, e As System.EventArgs)
> ' Declares an IDataObject to hold the data returned from the clipboard.
> ' Retrieves the data from the clipboard.
> Dim iData As IDataObject = Clipboard.GetDataObject()
>
> ' Determines whether the data is in a format you can use.
> If iData.GetDataPresent(DataFormats.Text) Then
> ' Yes it is, so display it in a text box.
> textBox2.Text = CType(iData.GetData(DataFormats.Text), String)
> Else
> ' No it is not.
> textBox2.Text = "Could not retrieve data off the clipboard."
> End If
> End Sub 'button2_Click
>
> When I build the project I keep getting the error 'error BC30002: Type
> 'IDataObject' is not defined.' I have added the statements
> Imports System.Object
> but this does not help. Any ideas ?
>
>
> --------------------------------
> From: Steve Payze
>
> -----------------------
> Posted by a user from .NET 247 (http://www.dotnet247.com/)
>
> <Id>Qgxbd0c0VUmqDZ4mjrxCqQ==</Id>



 
Reply With Quote
Reply

Thread Tools
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Copying the filtered data to clipboard is copying non-visible rows =?Utf-8?B?U2VldGhhUmFtYW4=?= Microsoft Excel Crashes 10 12th Jul 2006 09:39 PM
Copying Binary Data To the Clipboard Neo Microsoft Dot NET 0 15th Dec 2005 02:27 AM
Copying data to clipboard =?Utf-8?B?QnJhZA==?= Microsoft Access Form Coding 1 17th Jun 2005 01:54 AM
Copying files to clipboard word 2003 =?Utf-8?B?S00x?= Microsoft Word Document Management 0 29th Mar 2005 11:41 PM
Building installers for PocketPC 2000 and PocketPC 2002 using Visual Studio .NET 2003 Antao Almada Microsoft Dot NET Compact Framework 1 9th Sep 2004 10:54 AM


Features
 

Advertising
 

Newsgroups
 


All times are GMT +1. The time now is 11:51 AM.