Click here to Skip to main content
15,892,298 members
Home / Discussions / C#
   

C#

 
GeneralRe: Malformed Web Response Pin
Heath Stewart7-Jun-04 3:48
protectorHeath Stewart7-Jun-04 3:48 
Generalarray marshalling from c# to COM Pin
rana747-Jun-04 1:04
rana747-Jun-04 1:04 
GeneralRe: array marshalling from c# to COM Pin
Heath Stewart7-Jun-04 5:36
protectorHeath Stewart7-Jun-04 5:36 
GeneralRe: array marshalling from c# to COM Pin
rana747-Jun-04 18:41
rana747-Jun-04 18:41 
Questionwhich class can analyse HTTP? Pin
Xytme6-Jun-04 23:50
Xytme6-Jun-04 23:50 
AnswerRe: which class can analyse HTTP? Pin
Heath Stewart7-Jun-04 5:24
protectorHeath Stewart7-Jun-04 5:24 
QuestionWhere does PrintPreview store the doc ? Pin
sachinkalse6-Jun-04 23:37
sachinkalse6-Jun-04 23:37 
AnswerRe: Where does PrintPreview store the doc ? Pin
Heath Stewart7-Jun-04 5:28
protectorHeath Stewart7-Jun-04 5:28 
It's stored in memory, the same as all other objects in an object-oriented application (or even just variables in procedural languages - it's all about memory).

If you have large documents and don't want to buffer them all in memory, then you need to implement drawing routines from cached objects. For instance, if you get an event notificatin that the first page is being drawn, you should have to grab the first page full of what the document contains, leaving the rest on disk (when applicable).

Typically this is not a problem, though. In most applications, when you load a document (Word document, HTML document, Photoshop Drawing document, whatever) the whole thing is loaded into memory anyway. If you draw from that document, then only a single copy is read into memory for both displaying and printing. Certain things can affect this, however.

So, if you make your document class derive from PrintDocument, then you only need to have one reference loaded. When you assign your document object to the PrintPreviewDialog.Document property, for example, a reference is saved - not a copy of the document.

You don't have to derive from PrintDocument, either. Just make sure that any printing routines query your document object for how to print and you can save memory.

 

Microsoft MVP, Visual C#
My Articles
Questionhow to share dll? Pin
khchan6-Jun-04 23:37
khchan6-Jun-04 23:37 
AnswerRe: how to share dll? Pin
bneacetp6-Jun-04 23:49
bneacetp6-Jun-04 23:49 
GeneralRe: how to share dll? Pin
khchan7-Jun-04 5:10
khchan7-Jun-04 5:10 
GeneralRe: how to share dll? Pin
Heath Stewart7-Jun-04 5:42
protectorHeath Stewart7-Jun-04 5:42 
GeneralRe: how to share dll? Pin
LongRange.Shooter8-Jun-04 4:34
LongRange.Shooter8-Jun-04 4:34 
Generalwhich class can analyse HTTP. Pin
Xytme6-Jun-04 23:09
Xytme6-Jun-04 23:09 
GeneralRe: which class can analyse HTTP. Pin
Heath Stewart7-Jun-04 4:52
protectorHeath Stewart7-Jun-04 4:52 
GeneralRe: which class can analyse HTTP. Pin
Xytme7-Jun-04 15:58
Xytme7-Jun-04 15:58 
GeneralRe: which class can analyse HTTP. Pin
Heath Stewart8-Jun-04 2:43
protectorHeath Stewart8-Jun-04 2:43 
QuestionWich user control is on top? Pin
Klok6-Jun-04 22:59
Klok6-Jun-04 22:59 
AnswerRe: Wich user control is on top? Pin
bneacetp6-Jun-04 23:14
bneacetp6-Jun-04 23:14 
AnswerRe: Wich user control is on top? Pin
Stefan Troschuetz6-Jun-04 23:47
Stefan Troschuetz6-Jun-04 23:47 
GeneralRe: Wich user control is on top? Pin
Klok7-Jun-04 0:01
Klok7-Jun-04 0:01 
GeneralRe: Wich user control is on top? Pin
Klok7-Jun-04 1:39
Klok7-Jun-04 1:39 
GeneralRe: Wich user control is on top? Pin
Stefan Troschuetz7-Jun-04 2:13
Stefan Troschuetz7-Jun-04 2:13 
GeneralDataGrid row colour settings based on contents Pin
ma.poggi-cons6-Jun-04 22:08
ma.poggi-cons6-Jun-04 22:08 
GeneralRe: DataGrid row colour settings based on contents Pin
Jay Shankar6-Jun-04 22:35
Jay Shankar6-Jun-04 22:35 

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.