Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Save an Image
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

PW7962
Squire

USA
33 Posts

Posted - Jun 03 2006 :  10:44:55 AM  Show Profile  Visit PW7962's Homepage  Send PW7962 an AOL message  Reply with Quote
I'm trying to save my map as an image and am using this code:
'Save Map Image
Dim map As String
    With cdbSave  
        .DefaultExt = ".jpg"  
        .DialogTitle = "Save Map As..."  
        .Filter = "Map (*.jpg)"  
        .InitDir = App.Path  
        .ShowSave  
    End With
    map = cdbSave.FileName  
    Call SavePicture(picMap.Image, map)         'save image  

And when I use it it saves a blank image even if I have something drawn on it. Any suggestions?

Star Fantasy Unlimited Programmer

http://starfantasy.forumer.com

Edited by - PW7962 on Jun 03 2006 10:45:40 AM

Walrus
Squire

Slovenia
34 Posts

Posted - Jun 03 2006 :  1:29:19 PM  Show Profile  Reply with Quote
Have you set picMap's AutoRedraw property to true?

Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Jun 03 2006 :  2:43:40 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
I don't know why, but sometimes the following will help
  
Set picMap.Picture = picMap.Image  
'before
    Call SavePicture(picMap.Image, map)         'save image  
  

And make sure that AutoRedraw is True like Walrus suggested.
Go to Top of Page

PW7962
Squire

USA
33 Posts

Posted - Jun 03 2006 :  8:44:01 PM  Show Profile  Visit PW7962's Homepage  Send PW7962 an AOL message  Reply with Quote
Ok now I can save the image, but while actually drawing to the picturebox I cannot see it until I save it.

Star Fantasy Unlimited Programmer

http://starfantasy.forumer.com
Go to Top of Page

Eric Coleman
Gladiator

USA
811 Posts

Posted - Jun 03 2006 :  9:15:55 PM  Show Profile  Visit Eric Coleman's Homepage  Reply with Quote
Use the .Refresh method, picture1.Refresh
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
VBGamer © Go To Top Of Page
This page was generated in 0.12 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.