Solved

Saving the contents of a picturebox to a Bitmap file

Posted on 1998-07-25
5
328 Views
Last Modified: 2010-05-03
How can I save the contents of a Picturebox at runtime into a bitmap file . I am using Visual basic 5.0 Enterprise Edition
0
Comment
Question by:abhimishra
  • 3
5 Comments
 

Author Comment

by:abhimishra
ID: 1466660
Someone please help me , I reaaly need this answer badly .
0
 
LVL 8

Expert Comment

by:MikeP090797
ID: 1466661
Use SavePicture:
SavePicture Picture1.Picture, "C:\1.bmp"
0
 

Author Comment

by:abhimishra
ID: 1466662
I need to create thumbnails , so I am using the BITBLT API
call to create a reduced version of the image , the problem is
that when i transfer the scaled down version into a second picturebox
( which is to act as the thumbnail , and is small in size) ;
savepicture does not work on this BITBLTed image .
Is there any way to export the Clipboard to a file ... asuming the clipboard
contains BITMAP data
0
 
LVL 1

Accepted Solution

by:
cd74013 earned 200 total points
ID: 1466663
You can save the clipboard with:

if clipboard.getdata(vbCFBitmap) then ' save if it has a bitmap
    savepicture clipboard.getdata(vbCFBitmap),"filename"
    end if


I find it odd that you cannot use save picture on the second picture box directly.  Does it save a white picture, a zero length file or give an error?
0
 

Author Comment

by:abhimishra
ID: 1466664
Thankyou for your answer .
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

When designing a form there are several BorderStyles to choose from, all of which can be classified as either 'Fixed' or 'Sizable' and I'd guess that 'Fixed Single' or one of the other fixed types is the most popular choice. I assume it's the most p…
I was working on a PowerPoint add-in the other day and a client asked me "can you implement a feature which processes a chart when it's pasted into a slide from another deck?". It got me wondering how to hook into built-in ribbon events in Office.
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now