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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Print contents of a form 1

Status
Not open for further replies.

phita

Programmer
Jun 8, 2001
82
KE
Hi,
I have created a form that has several Chart Controls and also labels. Infact it looks like a PowerPoint slide. However, I now want to print the contents of the form as it looks without having to create a report. Is there code I can use or a class available that can send the form contents to the printer as it is ?

Any idea on how I can do this ?

Thanx in advance.
 
Hi,

When you press ALT+PrintScreen key of the keyboard, the visible WINDOW .i.e. screen image is posted to the clipboard. Though nothing seems to happen, the screen image is pasted to the clipboard... So I think from now onwards you get the idea... All you need is a editor to copy that image and print. You can even build the application class to output the image.

Microsoft Word is good, or by favourite, Microsoft Paint which you run by clicking Start, Programs, Accessories, Paint.

Once you have a program running, select Paste from the Edit menu and there you go, an image should appear.

The baby is yours to do whatever you want !!!...
ramani :-9
(Subramanian.G)
FoxAcc
ramani_g@yahoo.com
LET KNOW IF THIS HELPED. ENOUGH EXPERTS ARE HERE TO HELP YOU OUT! BEST OF LUCK :)
 
Hi,
Thanx for the tip. It really works. But another question is: I would have wanted to copy the form contents without involving the user. Is there any way that you can send kepresses to an active window whereby one can send ALT+PRINTSCREEN so that the form is copied, and then using OLE, I can paste it in Word and then Print, all without involving the user. I know this is possible in VB so I don't know whether it is possible in VFP.

Please help.

Thanx.
 
Hi phita,

What you're wanting to do is possible, and there are many threads regarding the interface of VFP and Word. To programatically simulate ALT+PRINTSCREEN look at the KEYBOARD command.

Jim
 
Hi everyone,
I will give the KEYBOARD command a try. I will also download the ScrnPrnt.Zip and see how it works.

Thanx folks !!!

Phita.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top