?
Solved

Picture1.Print "hello" works, but SavePicture saves the picture without the text

Posted on 2005-03-09
2
Medium Priority
?
338 Views
Last Modified: 2013-12-26
Hi Gurus

I have the following code:
        Picture1.AutoRedraw = True
        Picture1.FontSize = 8
        Picture1.CurrentX = 100
        Picture1.CurrentY = 100
       
       'fetch base image from another app
        Picture1.Picture = Clipboard.GetData(vbCFBitmap)
       'options
        Set Picture1.Picture = Picture1.Image 'doesnt seem to make a diff
        Picture1.Refresh 'doesnt seem to make a diff
       
        Picture1.Print "Hello world"
        SavePicture Picture1.Picture, filepath

At run time it correctly displays the text onto the loaded bit map.  However, when it saves, it only saves the bit map - without any of the text.

Could someone please help - I prefer to keep this simple and stay within VB (ie without any API etc complexities).

Thanks in advance.
0
Comment
Question by:BrianBeck
[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
2 Comments
 
LVL 53

Accepted Solution

by:
Ryan Chong earned 800 total points
ID: 13494816
try:

Picture1.AutoRedraw = True

        Picture1.FontSize = 8
        Picture1.CurrentX = 100
        Picture1.CurrentY = 100
       
       'fetch base image from another app
        Picture1.Picture = Clipboard.GetData(vbCFBitmap)
       'options
        Set Picture1.Picture = Picture1.Image 'doesnt seem to make a diff
        Picture1.Refresh 'doesnt seem to make a diff
       
        Picture1.Print "Hello world"
        SavePicture Picture1.Image, filepath
0
 

Author Comment

by:BrianBeck
ID: 13494906
Thanks ryancys - it worked!
0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
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…
Suggested Courses
Course of the Month14 days, 9 hours left to enroll

771 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