473,320 Members | 1,896 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

Can't retrieve a Palette from the clipboard

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

Jul 1 '07 #1
6 1281

" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>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

Jul 1 '07 #2

"Lloyd Sheen" <a@b.cwrote in message
news:B2**********************************@microsof t.com...
>
" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>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
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
Jul 1 '07 #3
On Sun, 1 Jul 2007 15:46:16 -0400, " active"
<ac**********@a-znet.comwrote:
>
"Lloyd Sheen" <a@b.cwrote in message
news:B2**********************************@microso ft.com...
>>
" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>>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
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

Jul 2 '07 #4
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
"Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNOSPAMwrote in message
news:03********************************@4ax.com...
On Sun, 1 Jul 2007 15:46:16 -0400, " active"
<ac**********@a-znet.comwrote:
>>
"Lloyd Sheen" <a@b.cwrote in message
news:B2**********************************@micros oft.com...
>>>
" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl.. .
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
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

Jul 2 '07 #5
If you're interested see the code I just submitted to the framework.drawing
NG
" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP02.phx.gbl...
>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
"Joergen Bech @ post1.tele.dk>" <jbech<NOSPAMNOSPAMwrote in message
news:03********************************@4ax.com...
>On Sun, 1 Jul 2007 15:46:16 -0400, " active"
<ac**********@a-znet.comwrote:
>>>
"Lloyd Sheen" <a@b.cwrote in message
news:B2**********************************@micro soft.com...

" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl. ..
>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
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


Jul 2 '07 #6
You might want to run the code I just submitted to the framework.drawing NG
"Lloyd Sheen" <a@b.cwrote in message
news:B2**********************************@microsof t.com...
>
" active" <ac**********@a-znet.comwrote in message
news:%2****************@TK2MSFTNGP05.phx.gbl...
>>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

Jul 2 '07 #7

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Sudar | last post by:
Web sites you visit can retrieve data from your clipboard depending on your security settings. Go to this page (www.clipboard.googlemyway.com) and see if anything shows up in the box. If you are...
4
by: Just Me | last post by:
I asked this in the VB NG and didn't get a response. I think this NG is no apt to know this kind of thing so I'm trying here. Trying to display the palette that is on the clipboard. I get a...
5
by: firewoodtim | last post by:
I want to analyze a GIF file and retrieve the histogram data on the image (pixel quantity and color symbol for each color in the file.) Does anyone know how to use PHP to do this? I've looked...
1
by: Stuart | last post by:
I am using the Python Imaging Library (PIL) to process GIF images. I need to be able to retrieve the RGB values for each color palette entry. I see that the 'Image' class has a 'palette'...
0
by: active | last post by:
Dim DataO As DataObject = CType(Clipboard.GetDataObject(), DataObject) If DataO.GetDataPresent(DataFormats.Palette, False) Then Dim cp As ColorPalette =...
0
by: active | last post by:
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 =...
8
by: active | last post by:
Guess I'm looking for someone who likes to work difficult puzzles. I can't seem to ever retrieve a palette handle from the clipboard. Below is a simple test program that demonstrates the...
2
by: Piotrekk | last post by:
Hi I am trying to get color palette of image and change it: Image tmpImg = pictureBox1.Image; // Here tmpImg.Palette sometimes has 0 entries and sometimes has some entries However when i...
1
by: lathamoulali | last post by:
Hello Frnds, In Dotnet(VB.NET) I have copied the MSChart to Clipboard as MSChart1.EditCopy(),now i want to retrieve the MSChart from Clipboard and save it as the bitmap. How to do this ? thanks,
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.