| | |
Tform1.print Save
Please support our Pascal and Delphi advertiser: Programming Forums - DaniWeb Sister Site
![]() |
•
•
Join Date: Oct 2009
Posts: 11
Reputation:
Solved Threads: 0
Hi guys,
I got a another question. i want to know how to go about saving a form1 to disk instead of printing it, so that i can email it to someone in a format that can be opened and read by the recepient. like for instance a home loan application form. i can print it yes but i am stumped about coding my app to save the file to disk.
can someone please help
Thanx
Vdub.za
I got a another question. i want to know how to go about saving a form1 to disk instead of printing it, so that i can email it to someone in a format that can be opened and read by the recepient. like for instance a home loan application form. i can print it yes but i am stumped about coding my app to save the file to disk.
can someone please help
Thanx
Vdub.za
•
•
Join Date: Jun 2007
Posts: 36
Reputation:
Solved Threads: 6
0
#2 Oct 31st, 2009
Hi
This code is For Saving your Form to Disk. For Example You can use this code as OnClik routine of your Form.
This code is For Saving your Form to Disk. For Example You can use this code as OnClik routine of your Form.
Pascal and Delphi Syntax (Toggle Plain Text)
procedure TForm1.Button1Click(Sender: TObject); Var Bitmap:TBitMap; R:TRect; begin BitMap:=TBitMap.Create; Try BitMap.Width:=Form1.ClientWidth; BitMap.Height:=Form1.ClientHeight; R:=Rect(0,0,Form1.ClientWidth,Form1.ClientHeight); BitMap.Canvas.CopyRect(R,Form1.Canvas,R); Bitmap.SaveToFile('Form1.BMP'); Finally Bitmap.Free; End; end;
•
•
Join Date: Oct 2009
Posts: 11
Reputation:
Solved Threads: 0
0
#3 Nov 1st, 2009
hi
when i originally posted this question i was told it was to safe a form1 to disk now i am told no, the question is actually how do i save a rave report - to disk instead of printing it. are there any differences or not? i tried the code that was supplied but i get an error saying "undeclared identifier 'clientwidth' " and i take it will say the same for height and all other measurements. sorry to keep on bugging you guys about it.
Thank you
Vdub.za
when i originally posted this question i was told it was to safe a form1 to disk now i am told no, the question is actually how do i save a rave report - to disk instead of printing it. are there any differences or not? i tried the code that was supplied but i get an error saying "undeclared identifier 'clientwidth' " and i take it will say the same for height and all other measurements. sorry to keep on bugging you guys about it.
Thank you
Vdub.za
•
•
Join Date: Nov 2009
Posts: 40
Reputation:
Solved Threads: 4
0
#4 Nov 10th, 2009
Have you checked the rave help for a savetofile or savetocsv?
Do you need the raw data or the report as an image?
Do you need it to be automated from code, or just a way the user can do it for a given on-screen report?
Anyway, try using a PDF printer, for instance, PDFCreator can save in PDF, but also in JPEG if neccesary, so you can paste it into an email.
This printer can be commanded for your app via registry or via com object, so you can autosave to a folder with the names you need and in the format you need (not exactly easy, but possible and works ok).
Do you need the raw data or the report as an image?
Do you need it to be automated from code, or just a way the user can do it for a given on-screen report?
Anyway, try using a PDF printer, for instance, PDFCreator can save in PDF, but also in JPEG if neccesary, so you can paste it into an email.
This printer can be commanded for your app via registry or via com object, so you can autosave to a folder with the names you need and in the format you need (not exactly easy, but possible and works ok).
![]() |
Similar Threads
- How do I get JTextArea (appended) text to output to print and save (Java)
- Trying to save the info in the student library. (Python)
- i have this on my XP desktop:TROJAN-SPY.HTML.SMITFRAUD.c (Viruses, Spyware and other Nasties)
- Virus report: msdirectx.sys (Viruses, Spyware and other Nasties)
- Trying to get rid of Hacktool.rootkit (Viruses, Spyware and other Nasties)
- svchos1at.exe // svchoms1at.exe (Viruses, Spyware and other Nasties)
- HighJackThis File Log, Please Help! (Viruses, Spyware and other Nasties)
- I need help with my hi-jack log I dont know what fix (or delete) and what not. (Viruses, Spyware and other Nasties)
- over heating (Cases, Fans and Power Supplies)
- Processor (Windows NT / 2000 / XP)
Other Threads in the Pascal and Delphi Forum
- Previous Thread: Draw chart in delphi
- Next Thread: daysbetween function
Views: 842 | Replies: 3
| Thread Tools | Search this Thread |
Tag cloud for Pascal and Delphi





