Lowyat.NET Forums

Welcome Guest ( Log In | Register )

LYN wins Intel-Lenovo-Tangs Blogathon challenge. Thank you everybody!
 
RSS feedBump TopicReply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> How to save picture using VB6

prometheus0229
post Jun 19 2006, 02:20 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #1


Getting Started
**

Group: Junior Member
Posts: 80
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jan 2003




Hi guys,

Need some help.

I need to capture the screen and automatically save it into a bmp file. The only command i know is:

Set Picture1.Picture = CaptureScreen()

but I don't want to output the picture instead i want to save the capturescreen say in c:\screen.bmp.

Thanks a million smile.gif
User is offlineProfile CardPM
Go to the top of the page
+Quote Post
dopodplaya
post Jun 19 2006, 04:45 PM
Show posts by this member only |This post's rating (0+, 0-) | Post #2


Look at all my stars!!
*******

Group: Senior Member
Posts: 2,088
Ratings earned: 0+, 0-
Ratings given: 0+, 0-

Joined: Jun 2006





QUOTE(prometheus0229 @ Jun 19 2006, 02:20 PM)
I need to capture the screen and automatically save it into a bmp file. The only command i know is:

Set Picture1.Picture = CaptureScreen()

but I don't want to output the picture instead i want to save the capturescreen say in c:\screen.bmp.

PictureBox control has the Picture object that handles the actual file and graphics. To save a Picture object to file (Windows Bitmap format) is using the method SavePicture (Picture, FileName)

where is Picture is a Picture Object (e.g PictureBox1.Picture where PictureBox1 is a PictureBox Control) and a String variable Filename (Full or relative path the save the file).

e.g to save a graphics loaded in Picture1 control (a PictureBox control) to filename "C:\Iamanoob.bmp". do this

If Picture1.Picture Is Not Nothing
SavePicture Picture1.Picture, "C:\Iamanoob.bmp"
End If
User is offlineProfile CardPM
Go to the top of the page
+Quote Post

Bump TopicReply to this topicTopic OptionsStart new topic
 



----debug section please ignore----
Lo-Fi Version Time is now: 24th November 2009 - 02:20 AM
All Rights Reserved 2003-2009 Vijandren Ramadass (~living on a prayer~)