Printing a A4 size form

I'm trying to develop a window forms application which should print a form with A4 size. But, when I try to print it it's printing only the screen resolution part of it but not the entire A4 form. Can anyone help me with some ideas....
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

are you using reports to print your data (which is contained withing the form?) or just printing the form out ?

usually the crystal reports provides very handy tools.

anyways, if you just want to print out the form. you may want to (resize0 the form using teh hieght and the width properties. so it is as A4 size then print then resize to the previous suitable size for you.

hieght and width are in twilps i guess. you will just need to make some calcualtion to know what values you would like to use for those 2 properties. - usually it says how much is the width point values against the cm or inch in the help-.

so an approach should go liek that

1) resize to a4 the form .
2) catch execptions(print).
3) resize to normal the form again.
4) exception handling - resize to normal.

the user wont notice the change.

about the things (controls) on the form. using a handi eqaution to maintain the aspect ratio would be useful.

somthing like

textbox.width = form.wdith/10

do not forget about the top and left which says where the start point of the control is

hope that helped you

waiting for your reply
pnadakuditiAuthor Commented:
Thanks for your response...

I'm using only the VS 2003 (no crystal reports).
I'm not worried about resizing - user doesn't care about how the form looks like....and my approach is something like this...also, I cannot resize because the background image is of fixed size

I've inserted a panel and set the background to an image which is of A4 size, to be able to view the complete A4 size form...i've set Scrollable property to true.... this is the point where I'm right now...from this point...I need to capture the entire A4 size of the panel into an image....I've done some research and found a method to print the content of the desktop...but I'm not able to figure out how I can get the entire scrollable panel which is of A4 size.

maybe you sould like to resize the image too. and just print the whole form. capturing the screen is done usually using the printscreen button. the active form by the alt+printscreen.

i dunno if that workaround will work for you. but maybe using a resize again and then using the send keys then pasting teh content of teh clipboard in a background mspaint and printing or somthing like that ..... maybe again i am just miles away of what you are doing .. but for me i guess that would be what is needed to do it. or maybe again just use a screen-suitabel size for teh form and use the resize work around.

waiting for your reply

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
.NET Programming

From novice to tech pro — start learning today.