Click here to Skip to main content
15,887,214 members
Home / Discussions / C#
   

C#

 
AnswerRe: logs window with a lot of lines Pin
Luc Pattyn13-Sep-10 2:25
sitebuilderLuc Pattyn13-Sep-10 2:25 
GeneralRe: logs window with a lot of lines Pin
IWannaTalk13-Sep-10 3:02
IWannaTalk13-Sep-10 3:02 
GeneralRe: logs window with a lot of lines Pin
Luc Pattyn13-Sep-10 3:10
sitebuilderLuc Pattyn13-Sep-10 3:10 
GeneralRe: logs window with a lot of lines Pin
IWannaTalk13-Sep-10 21:48
IWannaTalk13-Sep-10 21:48 
GeneralRe: logs window with a lot of lines Pin
Luc Pattyn13-Sep-10 23:44
sitebuilderLuc Pattyn13-Sep-10 23:44 
QuestionCreating a p7m file. Pin
shadowzz12345613-Sep-10 1:08
shadowzz12345613-Sep-10 1:08 
QuestionPrinting: Slow access to PaperSize Pin
OriginalGriff12-Sep-10 23:57
mveOriginalGriff12-Sep-10 23:57 
AnswerRe: Printing: Slow access to PaperSize Pin
Luc Pattyn13-Sep-10 2:10
sitebuilderLuc Pattyn13-Sep-10 2:10 
Hi Griff,


OriginalGriff wrote:
Is this just me?


You can breathe again, it is not just you.

In my experiments the line "PaperSize ps = pageSettings.PaperSize;" takes:
- 800 msec the very first time my app runs on Vista (and a dual-core)
- 280 msec later on (same app executing it again, or same app restarted)
- 300 msec the very first time my app runs on Win7 (different machine, comparable CPU power, well, actually a quad-core but I won't believe that is a factor)
- 130 msec later on

This once again proves complex dereferencing such as
Width = page.Document.DefaultPageSettings.PaperSize.Width;
Height = page.Document.DefaultPageSettings.PaperSize.Height;

is to be avoided. I suggest
PageSettings dps=page.Document.DefaultPageSettings;
Size pSize=dps.PaperSize;
Width=pSize.Width;
HeightpSize.Height;


That is the "one period per sentence" rule!

Smile | :)
Luc Pattyn [Forum Guidelines] [Why QA sucks] [My Articles] Nil Volentibus Arduum
Please use <PRE> tags for code snippets, they preserve indentation, and improve readability.


GeneralRe: Printing: Slow access to PaperSize Pin
OriginalGriff13-Sep-10 3:58
mveOriginalGriff13-Sep-10 3:58 
GeneralRe: Printing: Slow access to PaperSize Pin
Luc Pattyn13-Sep-10 4:10
sitebuilderLuc Pattyn13-Sep-10 4:10 
AnswerRe: Printing: Slow access to PaperSize Pin
Bernhard Hiller13-Sep-10 2:43
Bernhard Hiller13-Sep-10 2:43 
QuestionControl in front of another one at all times Pin
fdsfsa76f7sa612-Sep-10 22:19
fdsfsa76f7sa612-Sep-10 22:19 
AnswerRe: Control in front of another one at all times Pin
#realJSOP13-Sep-10 0:16
mve#realJSOP13-Sep-10 0:16 
GeneralRe: Control in front of another one at all times Pin
fdsfsa76f7sa613-Sep-10 0:48
fdsfsa76f7sa613-Sep-10 0:48 
GeneralRe: Control in front of another one at all times Pin
#realJSOP13-Sep-10 4:58
mve#realJSOP13-Sep-10 4:58 
AnswerRe: Control in front of another one at all times Pin
Luc Pattyn13-Sep-10 2:16
sitebuilderLuc Pattyn13-Sep-10 2:16 
GeneralRe: Control in front of another one at all times Pin
fdsfsa76f7sa613-Sep-10 2:39
fdsfsa76f7sa613-Sep-10 2:39 
GeneralRe: Control in front of another one at all times Pin
Luc Pattyn13-Sep-10 3:18
sitebuilderLuc Pattyn13-Sep-10 3:18 
GeneralRe: Control in front of another one at all times Pin
fdsfsa76f7sa613-Sep-10 9:20
fdsfsa76f7sa613-Sep-10 9:20 
GeneralRe: Control in front of another one at all times Pin
Luc Pattyn13-Sep-10 9:25
sitebuilderLuc Pattyn13-Sep-10 9:25 
GeneralRe: Control in front of another one at all times Pin
fdsfsa76f7sa613-Sep-10 10:56
fdsfsa76f7sa613-Sep-10 10:56 
GeneralRe: Control in front of another one at all times Pin
Luc Pattyn13-Sep-10 11:20
sitebuilderLuc Pattyn13-Sep-10 11:20 
Questionhow to list all the form name except mdi name Pin
Tridip Bhattacharjee12-Sep-10 22:10
professionalTridip Bhattacharjee12-Sep-10 22:10 
AnswerRe: how to list all the form name except mdi name Pin
Pete O'Hanlon12-Sep-10 22:15
mvePete O'Hanlon12-Sep-10 22:15 
Questioninstalling font programtically Pin
mobasher12-Sep-10 21:34
mobasher12-Sep-10 21:34 

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.