Click here to Skip to main content
15,798,508 members
Home / Discussions / Windows Forms
   

Windows Forms

 
AnswerRe: Resize problem with Listbox Pin
darkelv16-Jul-08 0:09
darkelv16-Jul-08 0:09 
AnswerCross Post Pin
Thomas Stockwell16-Jul-08 6:10
professionalThomas Stockwell16-Jul-08 6:10 
QuestionSkins.. Pin
Slick6914-Jul-08 1:06
Slick6914-Jul-08 1:06 
AnswerRe: Skins.. Pin
Thomas Stockwell15-Jul-08 9:46
professionalThomas Stockwell15-Jul-08 9:46 
QuestionA CheckBox with a LinkLabel Pin
Domenic Denicola13-Jul-08 13:27
Domenic Denicola13-Jul-08 13:27 
QuestionRead the URL of the Browser Pin
M_Menon13-Jul-08 6:00
M_Menon13-Jul-08 6:00 
Questionpassword change Pin
Sider8912-Jul-08 6:43
Sider8912-Jul-08 6:43 
QuestionPrinterSettings/DefaultPageSettings incredibly slow on a machine Pin
nxtwothou11-Jul-08 6:31
nxtwothou11-Jul-08 6:31 
I've hit a stumbling block on trying to figure out this problem. I have a winform app written in C# that was started back with 1.0 frame, then upgraded to 1.1, and recently I created a test 3.5 version. The deployed app is still the 1.1 as we have a lot of old 98 machines several of which don't want to upgrade to the 2.0 framework.

Here's the simplified code that I'm having problems with:

//1
PrintDocument printDocument1=new PrintDocument();
printDocument1.PrinterSettings.PrinterName=LastPrinterName;
//2
PrinterSettings ps=printDocument1.PrinterSettings;
PageSettings dps=ps.DefaultPageSettings;
string defaultsourcename=dps.PaperSource.SourceName;
//3
foreach(PaperSource p in ps.PaperSources)
comboBoxPaperSources.Items.Add(p.SourceName);
//4
string defaultsizename=dps.PaperSize.PaperName;
//5
foreach(PaperSize p in ps.PaperSizes)
comboBoxPaperSizes.Items.Add(p.PaperName);
//6

Basically my software has some 280 different reports and different ones go to different printers and to different sizes of paper. So the full code brings up an option screen that remembers the last settings and allows the user to store the settings for the specific report section and select a checkbox to not ask them for settings the next time they generate the report. The comments with numbers are to help identify how long it takes to do each section.

On my machine, a dual-core Server 2008 64 bit 4 gigs of ram, 8 printers set up, my 3.5 version in release mode takes this long:
1->2 0ms
1->3 31.2ms
1->4 46.8ms
1->5 78ms
1->6 109.2ms
On another Vista 32 bit machine, 2 gigs of ram, 12 printers set up, my 1.1 version in debug mode:
1->2 0ms
1->3 73ms
1->4 101ms
1->5 201ms
1->6 289ms
On my machine in a Hyper-V XP 32 bit window, 7 printers set up, using my 1.1 version in debug mode:
1->2 0ms
1->3 78.08ms
1->4 93.7ms
1->5 171.79ms
1->6 234.26ms
On my bosses new machine he received last week, a quad-core Vista 32 bit, 3 gigs of ram, 2 printers set up, my 3.5 version in release mode:
1->2 0ms
1->3 4,056ms
1->4 6,864ms
1->5 11,856ms
1->6 15,600ms
Using the 1.1 debug version puts 1->6 up to 17,255ms

Obviously, there's some sort of titanic problem with my bosses machine. The machine itself is incredibly fast. Every other operation in my software beats the tar timing-wise compared to my machine. As soon as it touches printers, it craps out. Wordpad/notepad/word/excel/acrobat/etc all seem to pull up printers fine. The machine is pretty "clean", all the crapware was uninstalled off of it, no virus scanner running, I've task manager killed everything non-critical. I've deleted all his printers out, reinstalled just the Microsoft XPS Document Writer. I've cleared out his temp folders and run a chkdsk. I've eliminated all the standard "this is why its slow" reasons that I know of. If it had been any other program on the machine, I would think its a windows issue, but since its just my software I'm stuck.

Does anyone have any suggestions on where to go from here?

It doesn't seem to be Vista 32 bit.
It doesn't seem to be number of printers.
It doesn't seem to be amount of ram.
It doesn't seem to be something running in the background.
It doesn't seem to be disk or printer corruption
It not affecting any "mainstream" apps
It doesn't seem to be a specific .NET framework version

So I don't know if its
Quad core and .NET
Some chunk of code I'm missing
Something I haven't thought of.
AnswerRe: PrinterSettings/DefaultPageSettings incredibly slow on a machine Pin
Luc Pattyn11-Jul-08 7:19
sitebuilderLuc Pattyn11-Jul-08 7:19 
GeneralRe: PrinterSettings/DefaultPageSettings incredibly slow on a machine Pin
nxtwothou14-Jul-08 4:18
nxtwothou14-Jul-08 4:18 
QuestionWindows Media Encoder get installed Automatically, when i instal mu project set up. Pin
balaji_vbr10-Jul-08 22:20
balaji_vbr10-Jul-08 22:20 
GeneralSkip readonly columns in DataGridView Pin
WILLIAM MAIN10-Jul-08 12:43
WILLIAM MAIN10-Jul-08 12:43 
GeneralRe: Skip readonly columns in DataGridView Pin
Kschuler11-Jul-08 7:38
Kschuler11-Jul-08 7:38 
QuestionChild list for field RelLicData cannot be created. Pin
sam1287410-Jul-08 10:18
sam1287410-Jul-08 10:18 
QuestionPassword&Label in Windows application Pin
Sider8910-Jul-08 9:28
Sider8910-Jul-08 9:28 
AnswerRe: Password&Label in Windows application Pin
Ashfield10-Jul-08 10:33
Ashfield10-Jul-08 10:33 
GeneralRe: Password&Label in Windows application Pin
Sider8910-Jul-08 21:35
Sider8910-Jul-08 21:35 
GeneralRe: Password&Label in Windows application Pin
Ashfield10-Jul-08 22:05
Ashfield10-Jul-08 22:05 
GeneralRe: Password&Label in Windows application Pin
Sider8910-Jul-08 22:42
Sider8910-Jul-08 22:42 
GeneralRe: Password&Label in Windows application Pin
Ashfield11-Jul-08 2:14
Ashfield11-Jul-08 2:14 
Questioncreating Docklet Application for windows [modified] Pin
kimozz9-Jul-08 14:02
kimozz9-Jul-08 14:02 
AnswerRe: creating Doclet Application for windows Pin
led mike10-Jul-08 5:52
led mike10-Jul-08 5:52 
GeneralRe: creating Doclet Application for windows Pin
kimozz10-Jul-08 11:52
kimozz10-Jul-08 11:52 
GeneralRe: creating Doclet Application for windows Pin
led mike10-Jul-08 12:31
led mike10-Jul-08 12:31 
GeneralRe: creating Doclet Application for windows Pin
kimozz10-Jul-08 12:35
kimozz10-Jul-08 12: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.