Results 1 to 3 of 3

Thread: cut and paste clipboard API!!

  1. #1

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Question cut and paste clipboard API!!

    i hv declare clipboard for mobile-based application......but cannot work, dont know whether i'm created correct or not.......pls guide me.....

    VB Code:
    1. Private Declare Function OpenClipboard Lib "Clipbd.lib" Alias "OpenClipboard" ()
    2. Private Declare Function setClipboardData Lib "Clipbd.lib" Alias "setClipboardData" (ByVal CF_TEXT, ByVal CF_Text) As String
    3. Private Declare Function getClipboardData Lib "Clipbd.lib" Alias "getClipboardData" (ByVal CF_Text) As String
    4.  
    5. Private Sub mnuItmCut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuItmCut.Click
    6.         If txtMessage.SelectedText <> "" Then
    7.             OpenClipboard()
    8.             setClipboardData(txtMessage.SelectedText, abc)
    9.             txtMessage.SelectedText = ""
    10.         End If
    11.     End Sub
    12.  
    13. Private Sub mnuItmPaste_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuItmPaste.Click
    14.         Me.txtMessage.SelectedText = getClipboardData(abc)
    15.  
    16. End Sub

  2. #2
    Frenzied Member Zakary's Avatar
    Join Date
    Mar 2005
    Location
    Canada, Quebec, Montreal
    Posts
    1,654

    Re: cut and paste clipboard API!!

    Why don't you use System.Windows.Forms.Clipboard instead of API ?
    Using VS 2010 on Fw4.0

  3. #3

    Thread Starter
    Fanatic Member
    Join Date
    Jul 2005
    Posts
    840

    Re: cut and paste clipboard API!!

    but mobile-based application dont have clipboard object......do u eman imports the name space?

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