|
-
Jul 7th, 2009, 02:07 AM
#1
Thread Starter
Fanatic Member
Save picturebox control image to a file
Hi,
How should I go about saving the picture box control (in ACCESS) image to a file.The picture box control contains images of different type (pbg,jpeg etc)
I need to save the images in either the original format or the .bmp format.
I've tried using saving the picturedata to file in VBA.
Please advice.
-
Jul 7th, 2009, 04:44 AM
#2
Re: Save picturebox control image to a file
don't know about in access, but you can try
savepicture image1.picture, "somepic.bmp"
i do my best to test code works before i post it, but sometimes am unable to do so for some reason, and usually say so if this is the case.
Note code snippets posted are just that and do not include error handling that is required in real world applications, but avoid On Error Resume Next
dim all variables as required as often i have done so elsewhere in my code but only posted the relevant part
come back and mark your original post as resolved if your problem is fixed
pete
-
Jul 7th, 2009, 04:47 AM
#3
Re: Save picturebox control image to a file
Change the path as required...
vb Code:
savepicture Picture1.Image, "C:\mybitmap.bmp"
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Jul 8th, 2009, 02:23 AM
#4
Thread Starter
Fanatic Member
Re: Save picturebox control image to a file
This method doesn't work for any pictures that are not bitmap.I've used some sample codes from http://www.cs.uvm.edu/~erickson/educ...b_bmp/BMP.html
But now my problem is the images size is not correct and a hazy image is being saved.
Please advice.
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
|