Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / Compact Framework / May 2005

Tip: Looking for answers? Try searching our database.

opennet sdf question.  Clipboard works, cut() does not

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
PPCdude - 27 May 2005 22:08 GMT
Hi,

I am having some trouble with the opennet sdf.  I have gotten it to
copy variables to the clipboard from a textboxex object if I explicity
tell it to.  i.e.:

       Dim strtxt As String = txtobj.SelectedText.ToString
       Dim onsf As OpenNETCF.Windows.Forms.Clipboard
       If strtxt <> "" Then
           onsf.SetClipboardText(strtxt)
       End If

But if I simply use txtobj.cut  it doesn't work.  Nothing gets copied
to the clipboard and the selected text doesn't get cut.

Any ideas on what I might be doing wrong?

Thank you
Daniel Moth - 27 May 2005 22:30 GMT
Which version of the SDF, on what device and show us the code that "doesn't
work" (rather than the code that does). If there is a compilation/runtime
error tell us which line it is on or otherwise describe what "doesn't work"
means (expected results/actual results).

As an aside, Clipboard has static members so you don't need to declare a
variable (onsf) for it - just use the class name instead.

Cheers
Daniel
--
http://www.danielmoth.com/Blog/

> Hi,
>
[quoted text clipped - 14 lines]
>
> Thank you
PPCdude - 28 May 2005 02:32 GMT
>>>Which version of the SDF, on what device and show us the code that "doesn't
work" (rather than the code that does). If there is a
compilation/runtime
error tell us which line it is on or otherwise describe what "doesn't
work"
means (expected results/actual results)..<<<

Thanks Daniel,  hope no offense was taken, I know it's something I am
doing.

For the most part, I did list the code.  But here are the event
handlers.

   Private Sub mnuCut_Click(ByVal sender As Object, ByVal e As
System.EventArgs) Handles mnuCut.Click

txtobj.cut()
   End Sub

txtobj.cut()  where txtobj is a textboxex.

My expected results would be that the text in txtobj would be both
copied to the clipboard and removed from the textbox instance.

This is opennet sdf 1.2
Peter Foot [MVP] - 28 May 2005 09:56 GMT
The TextBoxEx class Cut method sends a WM_CUT to the native textbox control.
What is your target platform - PocketPC, Smartphone, Windows CE?

I don't remember making any changes to this specific method, but have you
tried the code against the SDF v1.3?

Peter

Signature

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

>>>>Which version of the SDF, on what device and show us the code that
>>>>"doesn't
[quoted text clipped - 22 lines]
>
> This is opennet sdf 1.2
PPCdude - 28 May 2005 16:08 GMT
Peter,

I may have to look into  WM_CUT info.  I will also try version 1.3 and
see if that helps.

This is being used for Pocket PC.

Also, as posted above, should the txtobj.cut()  work as I have it?

I've also got as my only opennet imports the following:

Imports OpenNETCF.Windows.Forms
Imports OpenNETCF.Win32

thank you!
Peter Foot [MVP] - 28 May 2005 23:11 GMT
I've put a very basic sample app here:-
http://www.peterfoot.net/UsingTheClipboard.aspx

It works on my Pocket PC 2003 device, the context menu doesn't behave on the
2002 emulator as the textbox loses it's selection when the context menu is
invoked. This was built with SDF v1.3, you should also check you have the
latest .NETCF service pack installed on your device (SP3). If you have
problems with that code I'd be interested in more specifics of the device
you are using (PPC 2000/2002 etc) and how you are invoking the Cut method
(e.g. a context menu like this example?)

Peter

Signature

Peter Foot
Windows Embedded MVP
http://www.inthehand.com | http://www.peterfoot.net |
http://www.opennetcf.org

> Peter,
>
[quoted text clipped - 11 lines]
>
> thank you!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.