Results 1 to 6 of 6

Thread: Creating GIF or BMPs

  1. #1

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261

    Creating GIF or BMPs

    Anyway to Create A GIF file or A BMP file from VB. I have a series of points and I want to create an image ploting those Points.
    - regards -
    - razzaj -

  2. #2
    jim mcnamara
    Guest
    Consider plotting the points or whatever to a control like MSChart. Then use the BitBlt api to move the working area of the chart to a Picture box. Next, SavePicture Picture1.Picture "c:\myfile.bmp"

    For GIF format you will have to use an ImgEdit control instead of a picturebox and use the SaveAs method.

  3. #3
    Hyperactive Member
    Join Date
    Dec 2000
    Location
    Denver
    Posts
    265
    Bitmap - Yes
    Gif - No (sort of)

    You can use this simple routine to save a bitmap image from a control like a picturebox:

    Code:
    'in this case picture1 is a picturebox.  By the way,
    'even if you try to put an extension as .gif the format
    'will still be in bitmap format.
    savepicture picture1.image, "C:\mydir\myfile.bmp"
    I don't know of a way to save a gif through VB code...however if you look at planetsourcecode there are a couple utilities that will allow you to -convert- a bitmap to jpeg or gif format. The best one I know of is PicFormat32a

  4. #4

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    ok I think it is my fault I forgot to specify , I am not going to be able to use any ActiveX controls so , No Charts , No Image Comtrols , Basically I am operating from a COM object.
    - regards -
    - razzaj -

  5. #5

    Thread Starter
    Hyperactive Member razzaj's Avatar
    Join Date
    Oct 1999
    Location
    jounieh
    Posts
    261
    Huston .. we have a problem ... when I used StretchBlt to transfer the image from the Chart to a picture control ... I used saveimage ... but all it shows when I open the file is just gray backgroud as if no chart was there ...
    - regards -
    - razzaj -

  6. #6
    Member
    Join Date
    Aug 1999
    Location
    Houston
    Posts
    48

    turn autoredraw on in properties

    Make sure any of the transparent fonts are turned off in properties of picturebox. Also, set autoredraw ON.

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