473,219 Members | 1,816 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,219 software developers and data experts.

PrintForm in Hight quality

Hi,
I am designing a business card application, after designing the card which is a windows form, I want to print the form, but the PrintForm prints in poor quality (96 dpi), is there a way to print the form at the same quality of it controls (images for example)?

please help.
Jul 1 '08 #1
8 5909
I have a Control Printer class on my blog (below) which has a function called
GetControlImage which will give you an image of a control, or in your case a
form.
Then you cant print that image however you want, or it can do it for you.

HTH

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Tarek Al-Jamal" wrote:
Hi,
I am designing a business card application, after designing the card which is a windows form, I want to print the form, but the PrintForm prints in poor quality (96 dpi), is there a way to print the form at the same quality of it controls (images for example)?

please help
Jul 1 '08 #2
Thank you for your quick reply, but BitBlt captures the screen in 96 dpi, I want to capture it in high resolution to be printed in high resolution too.
Please help
"Ciaran O''Donnell" <Ci************@discussions.microsoft.comwrote in message news:E0**********************************@microsof t.com...
I have a Control Printer class on my blog (below) which has a function called
GetControlImage which will give you an image of a control, or in your case a
form.
Then you cant print that image however you want, or it can do it for you.

HTH

--
Ciaran O''Donnell
http://wannabedeveloper.spaces.live.com
"Tarek Al-Jamal" wrote:
Hi,
I am designing a business card application, after designing the card which is a windows form, I want to print the form, but the PrintForm prints in poor quality (96 dpi), is there a way to print the form at the same quality of it controls (images for example)?

please help
Jul 1 '08 #3
On Tue, 01 Jul 2008 03:44:38 -0700, Tarek Al-Jamal <Ta****@saudisoft.com>
wrote:
Hi,
I am designing a business card application, after designing the card
which is a windows form, I want to print the form, but the PrintForm
prints in poor quality (96 dpi), is there a way to print the form at the
same quality of it controls (images for example)?
I don't believe that there's a way using only managed code. But printing
a form is really a poor way to control printing anyway. You would be
better off simply using the data from the form to print explicitly
yourself (using PrintDocument, etc.).

Pete
Jul 1 '08 #4
Peter Duniho <Np*********@nnowslpianmk.comwrote:
Tarek Al-Jamal <Ta****@saudisoft.comwrote:
Hi,
I am designing a business card application, after designing the card
which is a windows form, I want to print the form, but the PrintForm
prints in poor quality (96 dpi), is there a way to print the form at the
same quality of it controls (images for example)?

I don't believe that there's a way using only managed code. But printing
a form is really a poor way to control printing anyway. You would be
better off simply using the data from the form to print explicitly
yourself (using PrintDocument, etc.).
This seems to be the thinking of MS (i.e. the reason why they don't
include a printform method in the framework)....both you and they are
wrong.

Printing the data from the form explicitly is, in a lot of cases,
simply a duplication of effort -- you have already spent time and
effort getting the layout of the controls and labels for your data into
an acceptable state.

Now you're supposed to spend *more* time and effort making a *new*
layout that presents the same data (with appropriate labels)....why?

IME in most cases the form on the screen is a perfectly acceptable
layout, and every second you spend on the new layout and getting it to
print beyond typing in MyForm.Print() is wasted.

--
J.B. Moreno
Jul 3 '08 #5
On Wed, 02 Jul 2008 22:38:44 -0700, J.B. Moreno <pl***@newsreaders.com>
wrote:
>I don't believe that there's a way using only managed code. But
printing
a form is really a poor way to control printing anyway. You would be
better off simply using the data from the form to print explicitly
yourself (using PrintDocument, etc.).

This seems to be the thinking of MS (i.e. the reason why they don't
include a printform method in the framework)....both you and they are
wrong.
You are welcome to your opinion. Suffice to say, I disagree.

In any case, being argumentative and dismissive isn't going to get you
anywhere. If I thought you were open to new ideas, I'd explain your
mistake to you. But it's clear you've made up your mind. Good luck with
that.

Pete
Jul 3 '08 #6
Peter Duniho <Np*********@nnowslpianmk.comwrote:
J.B. Moreno <pl***@newsreaders.comwrote:
But printing a form is really a poor way to control printing
anyway. You would be better off simply using the data from the
form to print explicitly yourself (using PrintDocument, etc.).
This seems to be the thinking of MS (i.e. the reason why they don't
include a printform method in the framework)....both you and they are
wrong.

You are welcome to your opinion. Suffice to say, I disagree.

In any case, being argumentative and dismissive isn't going to get you
anywhere. If I thought you were open to new ideas, I'd explain your
mistake to you.
Oh, I'm open to new ideas, but it'd have to be some argument to show
that having fewer choices is better than having more choices.

But it's clear you've made up your mind. Good luck with
that.
And you accused me of being dismissive...

--
J.B. Moreno
Jul 4 '08 #7
It will be very nice if you can guide me on any site has samples for printing the form using PrintDocument.
Thanks
"Peter Duniho" <Np*********@nnowslpianmk.comwrote in message news:op***************@petes-computer.local...
On Tue, 01 Jul 2008 03:44:38 -0700, Tarek Al-Jamal <Ta****@saudisoft.com
wrote:
Hi,
I am designing a business card application, after designing the card
which is a windows form, I want to print the form, but the PrintForm
prints in poor quality (96 dpi), is there a way to print the form at the
same quality of it controls (images for example)?
I don't believe that there's a way using only managed code. But printing
a form is really a poor way to control printing anyway. You would be
better off simply using the data from the form to print explicitly
yourself (using PrintDocument, etc.).

Pete
Jul 8 '08 #8
On Tue, 08 Jul 2008 02:14:20 -0700, Tarek Al-Jamal <Ta****@saudisoft.com>
wrote:
It will be very nice if you can guide me on any site has samples for
printing the form using PrintDocument.
Please don't post HTML. Thanks.

As for your question, oddly enough, the doc page for the PrintDocument
class has a sample:
http://msdn.microsoft.com/en-us/libr...tdocument.aspx

Note that I wrote "using the data from the form", not "the form itself".
If you literally want to print the form, you're pretty much stuck with the
technique you've already found, as far as managed code goes.

But you can get excellent results by not trying to duplicate the form
itself in the printout, but rather by formatting the data contained within
the form so that it's suitable for print rather than on-screen. You'll
need to draw the data yourself in the PrintPage event handler, just as you
would for a custom control displaying the data without the aid of any
built-in controls.

The sample at the link above shows a minimal example of how to do this.
You'd simply extend the idea to include whatever data it is you want to
print.

It's certainly more work, but it will produce much better results.

By the way, if you can represent your data as a database, you may find
that using Crystal Reports will produce better quality results without as
much effort as managing the entire print process yourself. I can't say
for sure, since I have never used it myself. But I've seen the feature and
I have to believe that it's useful in at least some situations. :)

Pete
Jul 8 '08 #9

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Standist | last post by:
In vb6 there is a method call printform but no in .net is there a way to do this ? There is a sample in msdn capture the screen and then print it.but it is blur when printed. And there is some...
5
by: spam | last post by:
Hi, I've a table with three rows. The middle row gets my content out of a database. Its hight is not defined, so it has the hight it needs to display all the content. But I need the row in...
2
by: kowndinya | last post by:
I want to print my form at run time using Me.printform command. it is working fine with Portrait. But i want in landscape. How to get it? How to set the page orientation through vb program? ...
0
by: smartin | last post by:
Aloha, I'm using PrintForm to fire off a simple, partially filled order form but I'm having trouble getting a decent printable size. Instead of scaling to match the page proportions, it takes up...
1
by: eqiz | last post by:
I'm looking for a way to print stuff from my program. I have searched and searched for a way to print and the only thing I have found is PrintFORM which only takes a picture of the form and prints it...
2
by: atetz785 | last post by:
I am using the .PrintForm command in my program and I was wondering if there is any way to get the form to print in the center of the page or to change any of the page setup options. Thanks, ...
0
by: GADOI | last post by:
Hello: I am using the new PowerPacks.Printing.PrintForm component. I have a form that is supposed to print the fornt and back of a badge. The Badge printer assumes that page 2 is the back. From...
0
by: Screaming Eagles 101 | last post by:
Hi, I use the Microsoft Powerpack Printform 1.0 component, which I am satisfied of, only 1 question, my printer can handle scaling, but I don't know how to set this. Looking over the...
0
by: =?Utf-8?B?ZnJlZGR5?= | last post by:
I downloaded the VB power pack printform the other day. I can use it in my c# application but I am having a problem with just printing out the controls only and not thewhole form that shows the...
0
by: veera ravala | last post by:
ServiceNow is a powerful cloud-based platform that offers a wide range of services to help organizations manage their workflows, operations, and IT services more efficiently. At its core, ServiceNow...
0
by: VivesProcSPL | last post by:
Obviously, one of the original purposes of SQL is to make data query processing easy. The language uses many English-like terms and syntax in an effort to make it easy to learn, particularly for...
0
by: mar23 | last post by:
Here's the situation. I have a form called frmDiceInventory with subform called subfrmDice. The subform's control source is linked to a query called qryDiceInventory. I've been trying to pick up the...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
2
by: jimatqsi | last post by:
The boss wants the word "CONFIDENTIAL" overlaying certain reports. He wants it large, slanted across the page, on every page, very light gray, outlined letters, not block letters. I thought Word Art...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.