Protected *lptr.LONG, *wptr.WORD, BitmapData. Procedure.l ClipboardGetImage(ImageNumber) get image from clipboard - some code courtesy of 'freak' Private Declare Function SetClipboardData Lib user32 (ByVal wFormat As Long, ByVal hMem As Long) As Long Private Declare Function CopyImage Lib user32. SetClipboardData_(#CF_BITMAP,UseImage(clip)) Is there such a thing as a "bad" bmp, that will display ok in an image gadget, but won't copy to the clipboard?įrontColor(Random(255),Random(255),Random(255)) This isn't random, either - it seems to be always the same images that work, and the same ones that don't work. So, I next tried Irfanview - here, all the images will "paste" in, but the ones that don't paste into PSP come into Irfanview as just tall, thin, all black 2 colour images (my desktop is 32bit) Oh, and the reason for copying the original image (image #2) into a new image (image #1) first, is because when I just copy the original image to the clipboard, when I try to paste the non-working ones into PSP, not only do they not paste, but also the image displayed in my program's window (in an image gadget) would disappear. Now, I paste it into PSP - sometimes it works, sometimes I get an error "can't read clipboard data", and sometimes nothing happens at all.Īnd sometimes when it doesn't work, I get a message from Windows that my program has caused an invalid page fault. Private Declare PtrSafe Function GetClipboardData Lib 'user32' (ByVal wFormat As Integer) As Long. OK, so I open PaintShopPro, then copy an image from my program. Returns string - An array of supported formats for the clipboard type.SetClipboardData(#PB_ClipboardImage,ImageID()) selection is only available on Linux.Ĭlears the clipboard content. the bitmap/metafile/COLOR Private Declare Function GetClipboardData Lib.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |