Click here to Skip to main content
16,004,833 members
Home / Discussions / C#
   

C#

 
QuestionWindows Events Pin
Monin D.16-Jan-07 8:18
Monin D.16-Jan-07 8:18 
AnswerRe: Windows Events Pin
Christian Graus16-Jan-07 8:23
protectorChristian Graus16-Jan-07 8:23 
AnswerRe: Windows Events Pin
Luc Pattyn16-Jan-07 8:26
sitebuilderLuc Pattyn16-Jan-07 8:26 
AnswerRe: Windows Events Pin
Dave Kreskowiak16-Jan-07 9:30
mveDave Kreskowiak16-Jan-07 9:30 
QuestionShowing two different printdocuments in single Print Preview dialog? Pin
kumar.bs16-Jan-07 8:08
kumar.bs16-Jan-07 8:08 
AnswerRe: Showing two different printdocuments in single Print Preview dialog? Pin
Luc Pattyn16-Jan-07 8:24
sitebuilderLuc Pattyn16-Jan-07 8:24 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
kumar.bs16-Jan-07 9:15
kumar.bs16-Jan-07 9:15 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
Luc Pattyn16-Jan-07 9:55
sitebuilderLuc Pattyn16-Jan-07 9:55 
I see two more possibilities

I now assume the two existing halfs (grid and chart) each provide their own OnPrintPage handler.

1. with fake PrintPageEventArgs

As said before, provide a PrinPageHandler; in it:
- create a new PrintPageEventArgs based on the PrintPageEventArgs you get as an input,
but with modified PageBounds
- call grid.OnPrintPage
- do similar for chart

2. with bitmaps

As said before, provide a PrinPageHandler; in it:
- create a bitmap with the size of your print page (from PrintPageEventArgs)
- create a graphics from that bitmap (Graphics.FromImage)
- pass that graphics plus original PrintPageEventArgs to grid.OnPrintPage, so now
the grid is in your bitmap (rather than on paper)
- do similar for chart
- now on the original graphics (from PrintPageEventArgs) draw the first grid's bitmap
with g.DrawImage and appropriate bounds; this puts it on paper
- similar for chart

drawback for method 2. is scale reduction may not be optimal, since graf/chart now
have first been bitmapped, then scaled

You would have to experiment with these to see what it gives...

Smile | :)



Luc Pattyn

GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
kumar.bs16-Jan-07 12:52
kumar.bs16-Jan-07 12:52 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
Luc Pattyn16-Jan-07 13:05
sitebuilderLuc Pattyn16-Jan-07 13:05 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
kumar.bs16-Jan-07 13:25
kumar.bs16-Jan-07 13:25 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
Luc Pattyn16-Jan-07 13:49
sitebuilderLuc Pattyn16-Jan-07 13:49 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
Luc Pattyn17-Jan-07 7:24
sitebuilderLuc Pattyn17-Jan-07 7:24 
GeneralRe: Showing two different printdocuments in single Print Preview dialog? Pin
kumar.bs18-Jan-07 10:52
kumar.bs18-Jan-07 10:52 
Questionproblem with <iframe> tag. Pin
hdv21216-Jan-07 7:38
hdv21216-Jan-07 7:38 
AnswerRe: problem with <iframe> tag. Pin
ednrgc16-Jan-07 8:32
ednrgc16-Jan-07 8:32 
GeneralRe: problem with <iframe> tag. Pin
hdv21216-Jan-07 9:02
hdv21216-Jan-07 9:02 
GeneralRe: problem with <iframe> tag. Pin
ednrgc16-Jan-07 9:04
ednrgc16-Jan-07 9:04 
QuestionDropDownList Problem Pin
fahiemulleh16-Jan-07 7:01
fahiemulleh16-Jan-07 7:01 
AnswerRe: DropDownList Problem Pin
Darren D16-Jan-07 8:23
Darren D16-Jan-07 8:23 
AnswerRe: DropDownList Problem Pin
Christian Graus16-Jan-07 8:24
protectorChristian Graus16-Jan-07 8:24 
QuestionUnkown array length of arrays; How? Pin
T.Willey16-Jan-07 6:40
T.Willey16-Jan-07 6:40 
AnswerRe: Unkown array length of arrays; How? Pin
T.Willey16-Jan-07 7:04
T.Willey16-Jan-07 7:04 
AnswerRe: Unkown array length of arrays; How? Pin
Aaron VanWieren16-Jan-07 7:13
Aaron VanWieren16-Jan-07 7:13 
GeneralRe: Unkown array length of arrays; How? Pin
T.Willey16-Jan-07 7:27
T.Willey16-Jan-07 7:27 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.