Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 357
  • Last Modified:

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

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
BrianBeck
Asked:
BrianBeck
1 Solution
 
Ryan ChongCommented:
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
 
BrianBeckAuthor Commented:
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.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now