|
-
Dec 20th, 2000, 07:16 PM
#1
Thread Starter
Member
I need to save the contents of a picture box to a bitmap file. Could someome please write me a little (or big) snippet of code for that purpose? Thanks!
-
Dec 21st, 2000, 02:09 AM
#2
Frenzied Member
there is a method called savepicture.
I dont really know the syntax now, but I think it is pretty much like
savepicture picture.image, filename
just look, the function is easy
Sanity is a full time job
Puh das war harter Stoff!
-
Dec 21st, 2000, 09:12 AM
#3
PowerPoster
MisanThr0p, the Image is the default pictureBox properties, hence no need to mention in the code. Like this will do
Code:
SavePicture Picture1, "C:\Mypics.bmp"
-
Dec 21st, 2000, 01:56 PM
#4
Frenzied Member
I heard default properties will no longer exist in newer VB version, so don't even begin programming like that.
Sanity is a full time job
Puh das war harter Stoff!
-
Dec 22nd, 2000, 12:56 PM
#5
PowerPoster
It's indeed better to write the whole property.
Else you'll often trap into mistakes which are hard to debug..
-
Dec 22nd, 2000, 02:34 PM
#6
Frenzied Member
If Fox says so
Sanity is a full time job
Puh das war harter Stoff!
-
Dec 22nd, 2000, 03:29 PM
#7
Frenzied Member
However, code runs faster if you don't explicitly state the default property of an object...at least so Im told.
-
Dec 23rd, 2000, 02:10 PM
#8
Frenzied Member
I will test this, but I can't believe it. Maybe, the compile time would be increased 0.000000000001 seconds if you do it all over your code, but I can't imagine, that the program would be slower.
Sanity is a full time job
Puh das war harter Stoff!
-
Dec 23rd, 2000, 06:35 PM
#9
PowerPoster
I *think* VB compiles the default property since it doesnt change during runtime, so you will only speed up compiling for 0.000...1 seconds
-
Dec 25th, 2000, 12:41 PM
#10
In other words, it's a matter of preference.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|