Can't retrieve a Palette from the clipboard

A

active

I asked this in VB without results.
I'm not surprised that no one there knows anything about because it's kind
of an uncommon subject.
Maybe some one here knows.

Dim DataO As DataObject = CType(Clipboard.GetDataObject(), DataObject)

If DataO.GetDataPresent(DataFormats.Palette, False) Then

Dim cp As ColorPalette = CType(DataO.GetData(DataFormats.Palette),
ColorPalette)



Do you know why the second line returns true but cp is nothing?
Actually,
DataO.GetData(DataFormats.Palette)
is nothing


Thanks
 
L

Lloyd Sheen

active said:
I asked this in VB without results.
I'm not surprised that no one there knows anything about because it's kind
of an uncommon subject.
Maybe some one here knows.

Dim DataO As DataObject = CType(Clipboard.GetDataObject(), DataObject)

If DataO.GetDataPresent(DataFormats.Palette, False) Then

Dim cp As ColorPalette = CType(DataO.GetData(DataFormats.Palette),
ColorPalette)



Do you know why the second line returns true but cp is nothing?
Actually,
DataO.GetData(DataFormats.Palette)
is nothing


Thanks

The only thing I can think of is that there is a pallete on the clipboard
but that pallete was set to nothing/null prior to adding it to the
clipboard. Can you check the addition of the pallete to the clipboard??

LS
 
A

active

Lloyd Sheen said:
The only thing I can think of is that there is a pallete on the clipboard
but that pallete was set to nothing/null prior to adding it to the
clipboard. Can you check the addition of the pallete to the clipboard??

LS
I put it there using Photoshop's "Copy".
I can't think of another way to get one on the clipboard so I can test my
software.
Nor any way to test the one Photoshop put there.

Thanks
 
J

Joergen Bech

I put it there using Photoshop's "Copy".
I can't think of another way to get one on the clipboard so I can test my
software.
Nor any way to test the one Photoshop put there.

Thanks

Ehm? How do you select a palette for copying in Photoshop?

The other question is: Do you know for sure that Photoshop places
something on the clipboard rather than using an internal clipboard
system for whatever you are attempting to get at?

Have you tried running ClipSpy to check what is actually there?

Regards,

Joergen Bech
 
A

active

I wrote a program that checkes to see what formats are on the clipboard and
Pallette appear after Photoshop does a Copy if the file is .GIF

Thanks
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top