Results 1 to 4 of 4
  1. #1
    Join Date
    May 2006
    Posts
    21

    Unanswered: Working with MSPaint through VB6

    Hi

    Through VB6, I can open MSPaint, put a .bmp picture there and save the picture. However ... even if I make the file extension .jpg, the file type stays bitmap.

    Does anybody know how to change the file type part of the "save as" form, through VB6?

    My ultimate goal is to change a file type from .bmp to .jpg, purely as a space-saving exercise. I don't want to use any other software if possible.

    I know that in VB6 you can't save as a picture other than a .bmp, so that's why I'm using MSPaint.

    All suggestions would be appreciated.
    Thanks in advance.

  2. #2
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Quote Originally Posted by janineweyers
    ...I know that in VB6 you can't save as a picture other than a .bmp, so that's why I'm using MSPaint.
    As Colonel Potter on MASH* would say... "Horsehocky!"

    ref Saving pictures to JPEG files (or others) using GDI+

    If you want to get more involved, here's a great GDI+ code library thread at our sister site.
    Last edited by loquin; 01-12-07 at 03:52.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


  3. #3
    Join Date
    May 2006
    Posts
    21
    HI
    Thanks Ioquin - much appreciated. I'm not the expert, I just did some research and all the sites I did look at said that you couldn't do it with VB. But thanks for showing me. It seems quite complex, so I'm going to take some time out to figure it out.

  4. #4
    Join Date
    Jun 2004
    Location
    Arizona, USA
    Posts
    1,848
    Quote Originally Posted by janineweyers
    HI
    Thanks Ioquin - much appreciated. I'm not the expert, I just did some research and all the sites I did look at said that you couldn't do it with VB. But thanks for showing me. It seems quite complex, so I'm going to take some time out to figure it out.
    VB's built-in objects won't save to jpg, but it's fairly easy to use external libraries to do so.

    In the end, it will be a lot less trouble than trying to automate paint.
    Lou
    使大吃一惊
    "Lisa, in this house, we obey the laws of thermodynamics!" - Homer Simpson
    "I have my standards. They may be low, but I have them!" - Bette Middler
    "It's a book about a Spanish guy named Manual. You should read it." - Dilbert


Posting Permissions

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