Link to home
Start Free TrialLog in
Avatar of CraigLazar
CraigLazar

asked on

Printing a form ?

HI
i am using the print dialog control to print a form .
but it is only printing th form on half the size of an A4 page ,How do i make it larger so it prints on the whole page.
ASKER CERTIFIED SOLUTION
Avatar of waty
waty
Flag of Belgium image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of CraigLazar
CraigLazar

ASKER

Hi waty
Is there not something a little easier ?
I don't see one. Did you tried this code?

Me again
Waty how do i use this enormuus length of code and were do i start calling the sub routines , if this works i will up my points for you

thanx craig
Hi Waty
I have put into a test project and not to sure were to start
eg : should i put a command button saying print or ?
thanx craig
This is my complete module, sure you could remove unecessary functions.

Private Sub Command1_Click()

   Set Picture1.Picture = CaptureForm(Me)
   
   Printer.PaintPicture Picture1.Picture, 1, 1, Printer.Width, Printer.Height
   Printer.EndDoc

End Sub

I have tested this code, and works perfectly.
Hi waty
I need to print invoices (being the form i want to print) i have not had time to test your sample code (much appreciated) ,is this sufficent to be able to print invoices ?
Craig
Try the previous sample, it will takes you only 2 minutes.

Add a picture on your form (outside of the visible parts),
and add the code to a test button. Click on it.... tath's all.

Waty thanx for your help but i am going to use crystal , to be the layout and tell my client they can print there invoice from inside crystal
thanx anyway
cheers
Ok, I also use Crystal for listings.