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:
Private Declare Function OpenClipboard Lib "Clipbd.lib" Alias "OpenClipboard" ()
Private Declare Function setClipboardData Lib "Clipbd.lib" Alias "setClipboardData" (ByVal CF_TEXT, ByVal CF_Text) As String
Private Declare Function getClipboardData Lib "Clipbd.lib" Alias "getClipboardData" (ByVal CF_Text) As String
Private Sub mnuItmCut_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles mnuItmCut.Click
If txtMessage.SelectedText <> "" Then
OpenClipboard()
setClipboardData(txtMessage.SelectedText, abc)
txtMessage.SelectedText = ""
End If
End Sub
Private Sub mnuItmPaste_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles mnuItmPaste.Click
Me.txtMessage.SelectedText = getClipboardData(abc)
End Sub
Re: cut and paste clipboard API!!
Why don't you use System.Windows.Forms.Clipboard instead of API ?
Re: cut and paste clipboard API!!
but mobile-based application dont have clipboard object......do u eman imports the name space?