473,721 Members | 2,220 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Simple Print Program Crashes Windows/XP HARD!

The following code (which is distilled down from a larger application)
worked for several years previously. Now, the instant you click on
the print icon within the print preview window the workstation crashes
hard: reboots and upon Windows restart wants to send an error report
to Microsoft (recovered from severe error). My default printer is HP
LaserJet 5000N Series PCL6; if I select an alternative printer
(different HP model) this application doesn't crash.

private void printDocument_P rintPage(object sender,
System.Drawing. Printing.PrintP ageEventArgs ppea) {
string strCell = DateTime.Now.To LongDateString( );
Font fontCell = new Font("Tahoma", 12.0f, FontStyle.Itali c);
SolidBrush brushCell = new SolidBrush(Colo r.Red);
ppea.Graphics.D rawString(strCe ll, fontCell, brushCell,
ppea.MarginBoun ds);
}

It seems like the following combination is important to reproducing
this problem: Printer = HP LaserJet 5000N Series PCL6, Font = Tahoma,
Font Style = Italic; Brush Color != Black.

Changing the font to Arial or removing the Italic flag or setting the
brush color to black will allow this code to run. The printer does
not support color. However, color in this application was previously
rendered in greyscale, which is what is intended. The preview shows
full color.

It is possible that recent workstation or server windows updates are
causing this problem, however it is hard to get the IT people excited
about this issue since only one application in our organization fails
this way. I was unable to get an application like Excel to cause this
crash. Is this problem due to the Framework or the printer driver or
a recent Microsoft update?

Using Framework 2.0 and Windows/XP; printing via a print server.

Apr 18 '07 #1
0 1512

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
1708
by: nephish | last post by:
Hey there, i have been spending some time learning python. i do enjoy it so. Heres the deal. i need some dirrection advice. i have a friend that wants me to set up a customer database for him. Easy stuff like name, phone number, email address. and current status. he also wants to be able to print this stuff out. Heres the deal. He runs windows xp. how could i write something to help him out ? i thought of glade, since its gtk and gtk can...
2
2271
by: javaBeginner | last post by:
I need to create a simple program launcher which runs off of cd and launches a program off of the cd. It must also check the values in an ini file. The launcher program must run on all versions of Windows. I have read that C++ and Delphi are the only two languages which could reliably accomplish this task. I have tried Delphi and it worked well but my employer does not want to pay Borland's license fee.
0
2245
by: Malcolm Cook | last post by:
I've discovered: Using "File > Print Preview" in a form's datasheet view with a server Filter crashes access after previewing... ....that is, unless ServerFilterByForm has been turned off after applying the filter. See the steps to recreate bug below for details.
5
7244
by: Rob Somers | last post by:
Hey all I am writing a program to keep track of expenses and so on - it is not a school project, I am learning C as a hobby - At any rate, I am new to structs and reading and writing to files, two aspects which I want to incorporate into my program eventually. That aside, my most pressing problem right now is how to get rid of the newline in the input when I use fgets(). Now I have looked around on the net, not so much in this group...
8
1349
by: Paul Bromley | last post by:
I am about to release the second version of a program that I started writing 12 months ago. The first version worked fine on 98 upwards. This version seems to crash on Windows 98. I realise that this is a bit vague, but anyone any broad guidance as to how I might go about sorting this one?? To make matters worse, It seems to work fine on a Windows 98 machine home - loaded onto 2 at this other site with dotnet framework and it crashes. The...
10
110272
true911m
by: true911m | last post by:
This is a simple walkthrough to get PyInstaller up and running. I decided to give PI a try, because it claims to be more selective about what it bundles into its executable files by default, and it also integrates UPX (Ultimate Packer for eXecutables) into the build process, if you have it installed. It also claims functionality on linux, as a bonus (I didn't test this). I highly recommend the UPX options, and will cover how to get it...
41
2454
by: z | last post by:
I use Visual C 2005 to develop my programs. One in particular is crashing in very specific and hard to replicate situations, made worse by the fact it only crashes when run -outside- the dev - as an exe, not from the Debug option. If I try to launch the debug on the crashing program, it'll close before the debugger opens. Any suggestions as to how I should proceed? Thanks in advance.
3
5061
by: writser | last post by:
hey all, For my study I'm writing a simple threaded webcrawler and I am trying to do this in python. But somehow, using threads causes IDLE to crash on Windows XP (with the latest python distribution 2.5.1). Even a simple example such as this: import thread, time def doSomething():
7
242
by: bvdp | last post by:
I'm finding my quest for a safe eval() quite frustrating :) Any comments on this: Just forget about getting python to do this and, instead, grab my set of values (from a user supplied text file) and call an external program like 'bc' to do the dirty work. I think that this would avoid someone from embedding os.system("rm ...") in what I thought would be a math expression and having it maybe do damage? Perhaps I'm getting too paranoid in...
0
8840
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8730
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
9367
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
9131
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
6669
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5981
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4484
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
3189
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
2576
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.