-
Hi, :D
I am trying to convert an icon to a bmp format.
I found an api call to convert an icon to picture format.
PHP Code:
Declare Sub OleCreatePictureIndirect Lib "olepro32.dll" ( _
lpPictDesc As PICTDESC, riid As UUID, _
ByVal fPictureOwnsHandle As Long, ipic As IPicture)
Is there an api call that converts a picture to a bmp or
an icon to a bmp?
:confused: :confused:
Could somebody help me, please. :)
TANKS. :D :cool: :D
-
baffled
when u say picture to BMP, do u mean from a picture box to a BMP file, coz u can use the SavePicture command!
-
Meanwhile I solved it. :D
'load the picture in the picture property of a picturebox
Picture2.Picture = ImageList1.ListImages.Item(CInt(TDBGrid.Columns("Icons").CellText(Bookmark))).Picture
'save the picture with the image property of the picture box
SavePicture Picture2.Image, "dummy.bmp"
'Now I can place the bmp in de cellstyle of the grid
CellStyle.ForegroundPicture=LoadPicture("dummy.bmp")
...
So you see I don't even need an api call.:rolleyes:
Thanks anyway. :D :D :D :D
-
-
and most of the times... renaming an icon to .bmp will also work!
-
Most of the time but in my case that didn't work.
Even under explorer if you rename the file to bmp, you
still got a message that the fileformat is wrong.
:) :D :) ;) :p :D :) :p
-
and for those without vb, capturing the screen and pasting in paint and cutting out what you want and saving that as a bmp works too.