Results 1 to 10 of 10

Thread: Saving bmp...

  1. #1
    haravinth
    Guest

    Question Saving bmp...

    How do i save bitmap files????

  2. #2
    Fanatic Member stickman373's Avatar
    Join Date
    Mar 2001
    Location
    MA
    Posts
    909
    this works for me

    Call SavePicture(Picture1.Picture, "c:\test.bmp")

  3. #3
    haravinth
    Guest
    I mean i want to save bitmap and text in one file.

  4. #4
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Where is the text? What do you want to make a bitmap file out of? Some more specific details please.

  5. #5
    haravinth
    Guest
    The text and the picture is in the rich text box.

  6. #6
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Then you need to save the whole file in RTF format. You can use simple file access to save each chunk of that RTF text as an RTF file like this:

    VB Code:
    1. Open mywholefile.txt For Output As #1
    2. Print #1, RichTextBox1.TextRTF
    3. Close #1
    Baaaaaaaaah

  7. #7
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Ah...the text and picture are in a RichTextBox...that makes it clear, although Abdul beat to a solution. However, Abdul, I have a question. If haravinth wishes to save the contents of his RichTextBox to a bitmap file, wouldn't he want to do something like
    VB Code:
    1. 'create as bitmap file.   Windows should recognize the extension
    2. Open mywholefile.bmp For Output As #1
    3. Print #1, RichTextBox1.TextRTF
    4. Close #1

  8. #8
    PowerPoster abdul's Avatar
    Join Date
    Dec 2000
    Location
    Ontario,Canada
    Posts
    2,827
    Originally posted by Hack
    However, Abdul, I have a question. If haravinth wishes to save the contents of his RichTextBox to a bitmap file, wouldn't he want to do something like...
    I thought he wanted to save the contents of the Rich Text Box (including the text and the bitmap) as he said here:

    haravinth The text and the picture is in the rich text box.
    If you save the file as a bitmap, it is gonna save the text and the bitmap(s) which will corrupt the whole bitmap file. I thought he wanted to just save the contents of Rich Text Box (including that bitmap) so he will be able to retrieve that back again
    Baaaaaaaaah

  9. #9
    haravinth
    Guest
    Yaa, Abdul is right. Now my program is working well.

  10. #10
    I'm about to be a PowerPoster! Hack's Avatar
    Join Date
    Aug 2001
    Location
    Searching for mendhak
    Posts
    58,333
    Ok. My misunderstanding. I'll go take my foot out of my mouth now (today seems to be the day for that for me!)

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