Solved

Saving the contents of a picturebox to a Bitmap file

Posted on 1998-07-25
5
348 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 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

Instantly Create Instructional Tutorials

Contextual Guidance at the moment of need helps your employees adopt to new software or processes instantly. Boost knowledge retention and employee engagement step-by-step with one easy solution.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Prevent checkbox click event occur while editing it in vb6 8 74
Protecting vb6 & .Net code Obfuscation 18 216
how to know if my Checkbox is True in VB6.0? 9 70
vbModal 12 75
Article by: Martin
Here are a few simple, working, games that you can use as-is or as the basis for your own games. Tic-Tac-Toe This is one of the simplest of all games.   The game allows for a choice of who goes first and keeps track of the number of wins for…
This article describes some techniques which will make your VBA or Visual Basic Classic code easier to understand and maintain, whether by you, your replacement, or another Experts-Exchange expert.
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…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

751 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