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. 8 5958
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
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
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
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
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
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
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
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 This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics
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...
|
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...
|
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?
...
|
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...
|
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...
|
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,
...
|
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...
|
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...
|
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...
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: emmanuelkatto |
last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud.
Please let me know.
Thanks!
Emmanuel
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers,...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
| |