Results 1 to 7 of 7

Thread: Icon to bmp

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hooglede (belgium)
    Posts
    63

    Talking

    Hi,

    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 PICTDESCriid As UUID_
        ByVal fPictureOwnsHandle 
    As Longipic As IPicture
    Is there an api call that converts a picture to a bmp or
    an icon to a bmp?


    Could somebody help me, please.

    TANKS.

  2. #2
    TheSarlacc
    Guest

    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!

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hooglede (belgium)
    Posts
    63
    Meanwhile I solved it.

    '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.

    Thanks anyway.

  4. #4
    TheSarlacc
    Guest

    very nice

  5. #5
    anoop007
    Guest
    and most of the times... renaming an icon to .bmp will also work!

  6. #6

    Thread Starter
    Member
    Join Date
    Oct 2000
    Location
    Hooglede (belgium)
    Posts
    63
    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.



  7. #7
    coder. Lord Orwell's Avatar
    Join Date
    Feb 2001
    Location
    Elberfeld, IN
    Posts
    7,628
    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.
    My light show youtube page (it's made the news) www.youtube.com/@lightsofelberfeld
    Contact me on the socials www.facebook.com/lordorwell

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width