Basic4ppc - Windows Mobile Development  

Go Back   Basic4ppc - Windows Mobile Development > Main Category > Questions & Help Needed
Home Register FAQ Members List Search Today's Posts Mark Forums Read

Questions & Help Needed Post any question regarding Basic4ppc.


Clipboard


Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 08-16-2007, 05:47 AM
Newbie
 
Join Date: Jul 2007
Posts: 2
Default Clipboard

Can anyone see what is wrong.
I have done a short program that should paste texbox1.text into textbox2.text (if i am understanding things right).
When button1 is clicked textbox2 goes blank (no text). The text in textbox1 is "textbox1", shouldn't that be copied?

Sub Globals
'Declare the global variables here.
End Sub

Sub App_Start
Form1.Show
hw.new1 'hw is a Hardware object.
End Sub


Sub Button1_Click
hw.SetClipboardData(textbox1.Text)
textbox2.Text=hw.GetClipboardData
End Sub
Reply With Quote
  #2 (permalink)  
Old 08-16-2007, 06:37 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

Are you running this code on a device?
Reply With Quote
  #3 (permalink)  
Old 08-16-2007, 06:50 AM
Newbie
 
Join Date: Jul 2007
Posts: 2
Default

No this was on the desk-top
Reply With Quote
  #4 (permalink)  
Old 08-16-2007, 06:52 AM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

The Hardware library is only supported on the device.
It uses OS features that are unique to the device OS.
Reply With Quote
  #5 (permalink)  
Old 09-10-2007, 01:38 PM
Senior Member
 
Join Date: May 2007
Posts: 127
Default

Hi,
I've tried using hardware.SetClipBoardData, hardware.GetClipBoardData and formlib context menu for "cut/copy/paste/Select All" function on a textbox1.
but SetClipBoardData and GetClipBoardData return the whole text of textbox1 to textbox2 while I've only selected portion of text.

I've followed the help samples.
Can you help me on this?

PHP Code:

Sub App_Start

hrdwr01
.new1 ' a Hardware object.
hrdwr01.SetClipboardData(Textbox1.Text)

formlib1.New1("form1"",B4PObject(1)) 

      Context1.New1
      Context1.AddItem("Cut")
      Context1.AddItem("Copy")
      Context1.AddItem("Paste")
      Context1.AddItem("Delete")
      Context1.AddItem("-") '
Adds a separator
      Context1
.AddItem("Select All")

      
formlib1.AddContextMenu("Textbox1",Context1.Value)
End Sub

Sub context1_click
Select context1
.SelectedText
Case "Cut"
textbox2.text=hrdwr01.GetClipboardData
Case "Copy"
Case "Paste"
Case "-"
Case "Select All"
End Select
End Sub 
What other things I've missed?
__________________
Rioven

O2 Atom life 624MHz, 1GB Internal ROM, WM6(upgraded)
Reply With Quote
  #6 (permalink)  
Old 09-10-2007, 02:11 PM
Erel's Avatar
Administrator
 
Join Date: Apr 2007
Posts: 2,806
Default

See this post: Text Editor example
Reply With Quote
  #7 (permalink)  
Old 09-10-2007, 02:19 PM
Senior Member
 
Join Date: May 2007
Posts: 127
Default

Thank you so much!
__________________
Rioven

O2 Atom life 624MHz, 1GB Internal ROM, WM6(upgraded)
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

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

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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Access to Clipboard data with HardwareDesktop.dll Woinowski Basic4ppc Wishlist 1 05-06-2008 02:50 PM
search-funktion and clipboard-funktion Filippo Basic4ppc Wishlist 1 05-16-2007 07:57 PM


All times are GMT. The time now is 05:15 AM.


Powered by vBulletin® Version 3.6.10
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.1.0