表格keydown事件,写代码
If e.control = True AndAlso e.keycode = keys.v Then
'执行代码
Dim str As String = ClipBoard.GetText
Dim nstr As String = ""
Dim tempstr As String = ""
Dim flag As Boolean = False
For i As Integer = 0 To str.length - 1
If str(i) = """" Then
If i = 0 OrElse str(i-1) = chr(9) OrElse str(i-1) = chr(10) Then '开始
flag = True
ElseIf i = str.length-1 OrElse str(i+1) = chr(9) OrElse str(i+1) = chr(13) Then '结束
tempstr = tempstr.Replace(chr(13), "")
nstr &= tempstr
tempstr = ""
flag = False
End If
End If
If flag = True Then
tempstr &= str(i)
Else
nstr &= str(i)
End If
Next
ClipBoard.SetText(nstr)
End If
http://foxtable.com/bbs/dispbbs.asp?BoardID=2&ID=123061&skin=0