Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Printing BMP files

Status
Not open for further replies.

bebbo

Programmer
Dec 5, 2000
621
GB
How can I print an image from a bitmap file???
 
Bebbo,
In your report form, place an Image box on the form. Set the properties as you like for how the image will appear. You have 3 options: Clip (use actual size, clip to size of box) Stretch (Strecth the image to fill the box) and Isometric (Stretch image to fill box, but retain shape, so it will either fill height, or width, but will be proprtionate for the opposite).
Next, if your image is a constant image (like a logo), simply make the datasource the exact name and path for the image. (i.e. C:\MYPROJ\BMPS\LOGO.BMP) That will display the image in your form. If you don't know what image will be printed until print time, load the value into a variable, and pass the variable to the image. On your report form, it will show the Image as a grey box, with a cross hair through it, but at run time, you will see the .BMP file you desire.

If you need more details, please feel free to ask further questions.

Thanks,
-Scott

s-) Please let me know if this has helped s-)
 
Scott

Thanks for the info. I'm sorry I've mislead you. What I want to do is print the image on paper. I do this alot using OPOS drivers however I've been asked to print BMP files using printers via Windows. Basically I'm printing something similar to a receipt with a logo on top.

Thanks

Bebbo
 
Bebbo,
Yes, that is what this solution does. You are printing the image on Paper. I assume you are using the report designer built into Fox. In that case, there is an object in the report options. Drop the control onto the form. A dialog box should appear that allows you to pick the image you want in the "Picture" box. Once you drop it on the form, you should see it. Then, when you print the report, it will print on your form, as it appears. There is no magic with a .BMP, it is natively supported by VFP. If I'm still missing something, let me know, and I'll try to help further.


Thanks,
-Scott

s-) Please let me know if this has helped s-)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top