Is it possible to use the Clipboard class to grab all the data from the clipboard, like full skype quotes? They use some kind of metadata I think, which is how it knows when something is a quote or not.
How can I access that from the Clipboard class? What functions would I call to set/restore Skype quotations?
Thanks for the help!
Imports System.IO
Imports System.Text
Public Class Form1
Dim locale As New MemoryStream()
Private Sub l() Handles MyBase.Load
Dim strr As New StreamReader(CType(Clipboard.GetData("SkypeMessageFragment"), System.IO.Stream))
locale = Clipboard.GetData("locale")
TextBox1.Text = strr.ReadToEnd()
For Each x In Clipboard.GetDataObject().GetFormats()
'MessageBox.Show("Format " + x + ": " + Clipboard.GetData(x).ToString)
Next
End Sub
Private Sub TextBox1_TextChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles TextBox1.TextChanged
Clipboard.Clear()
Clipboard.SetData("SkypeMessageFragment", StreamFromString(TextBox1.Text))
Clipboard.SetData("Text", "testing")
Clipboard.SetData("System.String", "testing")
Clipboard.SetData("UnicodeText", "testing")
Clipboard.SetData("OEMText", "testing")
Clipboard.SetData("locale", locale)
End Sub
Private Shared Function StreamFromString(ByVal s As String) As Stream
Dim encoding As New System.Text.UnicodeEncoding()
Dim mem As New MemoryStream(encoding.GetBytes(s))
Return mem
End Function
End Class