Hi;
i want to print some controls on a form. I capture controls then draw them
on print page. This is how i do it:
http://www.dotnet247.com/247reference/msgs/5/26236.aspx

now the problem is when i open a printpreview form, "generating previews"
dialog box is shown first and if it is in front of a control to be printed,
it is captured too.

how can i avoid it?

secondly, sometimes even if print page seems ok on the preview, images of
the controls are distorted when i print them.

what would be the reason?


and another question, how can i print multiple pages?
eg: i wanna put some controls on second page. There is HasMorePages
property. i do not figured how to use it

last question:
what is the usual way when i want to print texts of many textboxes to
prepare a report?

thank you very much.

Re: about Printing forms by hirf-spam-me-here

hirf-spam-me-here
Thu Jul 15 05:58:13 CDT 2004

* "e-mid" <someone@somewhere> scripsit:
> i want to print some controls on a form. I capture controls then draw them
> on print page. This is how i do it:
> http://www.dotnet247.com/247reference/msgs/5/26236.aspx
>
> now the problem is when i open a printpreview form, "generating previews"
> dialog box is shown first and if it is in front of a control to be printed,
> it is captured too.

Take the screenshot before actually painting the bitmap that contains
the screenshot onto the printer. But yes, if there are parts of the
window hidden by another window, they cannot be captured.

> and another question, how can i print multiple pages?
> eg: i wanna put some controls on second page. There is HasMorePages
> property. i do not figured how to use it

<URL:http://dotnet.mvps.org/dotnet/samples/printing/downloads/PrintingDemo.zip>

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: about Printing forms by e-mid

e-mid
Thu Jul 15 07:13:46 CDT 2004


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:e54KzslaEHA.212@TK2MSFTNGP12.phx.gbl...
> * "e-mid" <someone@somewhere> scripsit:
> > i want to print some controls on a form. I capture controls then draw
them
> > on print page. This is how i do it:
> > http://www.dotnet247.com/247reference/msgs/5/26236.aspx
> >
> > now the problem is when i open a printpreview form, "generating
previews"
> > dialog box is shown first and if it is in front of a control to be
printed,
> > it is captured too.
>
> Take the screenshot before actually painting the bitmap that contains
> the screenshot onto the printer. But yes, if there are parts of the
> window hidden by another window, they cannot be captured.

when i click preview button, ppd.ShowDialog( ) is called , preview dialog
appears then and PrintPage event is handled where controls to be printed
are captured. At the same time, "generating previews" dialog with a progress
bar is shown until the generation of previews are finished, so it hides
some controls. i do not find a way to hide that dialog.

> > and another question, how can i print multiple pages?
> > eg: i wanna put some controls on second page. There is HasMorePages
> > property. i do not figured how to use it
>
>
<URL:http://dotnet.mvps.org/dotnet/samples/printing/downloads/PrintingDemo.z
ip>
>

this sample is very good especially about how to use HasMorePages property.
thankz..

> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>



Re: about Printing forms by hirf-spam-me-here

hirf-spam-me-here
Thu Jul 15 09:44:07 CDT 2004

* "e-mid" <someone@somewhere> scripsit:
>> Take the screenshot before actually painting the bitmap that contains
>> the screenshot onto the printer. But yes, if there are parts of the
>> window hidden by another window, they cannot be captured.
>
> when i click preview button, ppd.ShowDialog( ) is called , preview dialog
> appears then and PrintPage event is handled where controls to be printed
> are captured. At the same time, "generating previews" dialog with a progress
> bar is shown until the generation of previews are finished, so it hides
> some controls. i do not find a way to hide that dialog.

Why not call the capture mechanism before calling 'ppd.ShowDialog'?

--
Herfried K. Wagner [MVP]
<URL:http://dotnet.mvps.org/>

Re: about Printing forms by e-mid

e-mid
Thu Jul 15 14:21:11 CDT 2004


"Herfried K. Wagner [MVP]" <hirf-spam-me-here@gmx.at> wrote in message
news:OZwU0onaEHA.2260@TK2MSFTNGP10.phx.gbl...
> * "e-mid" <someone@somewhere> scripsit:
> >> Take the screenshot before actually painting the bitmap that contains
> >> the screenshot onto the printer. But yes, if there are parts of the
> >> window hidden by another window, they cannot be captured.
> >
> > when i click preview button, ppd.ShowDialog( ) is called , preview
dialog
> > appears then and PrintPage event is handled where controls to be
printed
> > are captured. At the same time, "generating previews" dialog with a
progress
> > bar is shown until the generation of previews are finished, so it
hides
> > some controls. i do not find a way to hide that dialog.
>
> Why not call the capture mechanism before calling 'ppd.ShowDialog'?

ok , ok i am sorry, my head is gone away for while.


> Herfried K. Wagner [MVP]
> <URL:http://dotnet.mvps.org/>