Clearing the Clipboard?

The Clipboard can contain multiple RawData and PrivateRawData types… How can one clear all of them or specific ones?

Just setting the value to “” does not work for clearing raw data:

This shows true twiceL

[code] Dim C as New Clipboard

C.AddRawData “Something”, “Test”
MsgBox Str(C.RawDataAvailable(“Test”))
C.AddRawData “”, “Test”
MsgBox Str(C.RawDataAvailable(“Test”))
[/code]

this worked:

[code] Dim C as Clipboard

C = New Clipboard
C.AddRawData “Something”, “Test”
MsgBox Str(C.RawDataAvailable(“Test”))
C.AddRawData “”, “Test”
MsgBox Str(C.RawDataAvailable(“Test”))
C.Close

C = New Clipboard
C.Text = “”
C.Close

MsgBox Str(C.RawDataAvailable(“Test”))[/code]

Thanks… Not intuitive but it works!

I agree its a bit messy… but if you wanted to clean it up, you could sub class clipboard and then add a method call Clear that would perform the action.

then you could call it like:

[code] dim C as rhClipBoard
C = new rhClipBoard

C.AddRawData “Something”, “Test”
MsgBox Str(C.RawDataAvailable(“Test”))
C.AddRawData “”, “Test”
MsgBox Str(C.RawDataAvailable(“Test”))
C.Close
C.Clear

MsgBox Str(C.RawDataAvailable(“Test”))[/code]