Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Saving the contents of a picturebox to a Bitmap file

Posted on 1998-07-25
5
Medium Priority
?
367 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 600 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

Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
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 process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Suggested Courses

722 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