Solved

Printing Inverse in VB with HP LaserJet 4si

Posted on 1998-10-22
4
266 Views
Last Modified: 2011-09-20
How do I Print a rectangle with a black background and white text together to a HP LaserJet 4si. NOT Black background with black text and white background. I want the area around the characters to be black also.  VB wonderfully strips chr(27) from anything I  send to the spooler.  Argggg!
0
Comment
Question by:vanmeter
  • 2
  • 2
4 Comments
 

Author Comment

by:vanmeter
ID: 1441233
Adjusted points to 400
0
 
LVL 12

Expert Comment

by:mark2150
ID: 1441234
You should be able to change the text background and foreground to give you reverse text. Only problem is that you can't change a dot back to white once it's black. Thus your text will appear in a black stripe, but if you overlay it on a black rectangle you'll get a solid black rectangle. The text is there, you just can't see it.

Solution is to use several rectangles to frame your text. Leave a "hole" in the center for your inverted text. I'll give it a try on my printer and post the code.

M
0
 

Author Comment

by:vanmeter
ID: 1441235
Unfortunately that will not work.  I can put a white rectangle inside a black background fill but it does not accomplish my inverse text requirements.
0
 
LVL 12

Accepted Solution

by:
mark2150 earned 400 total points
ID: 1441236
You need to tape off the area *around* the rectangle. If you make one large black rectangle and *then* overlay a white one, the "white" area will remain black. If you bracket the area you want to invert print in by printing black areas above, below, right and left of it you'll have an *unprinted* area. *THEN* carefully shoot in the inverted text and you should have your fix.

This presumes that inverted text looks ok when printed on a page by itself. If the inverted text comes out as a black stripe you're hosed.

M

0

Featured Post

Is Your AD Toolbox Looking More Like a Toybox?

Managing Active Directory can get complicated.  Often, the native tools for managing AD are just not up to the task.  The largest Active Directory installations in the world have relied on one tool to manage their day-to-day administration tasks: Hyena. Start your trial today.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

There are many ways to remove duplicate entries in an SQL or Access database. Most make you temporarily insert an ID field, make a temp table and copy data back and forth, and/or are slow. Here is an easy way in VB6 using ADO to remove duplicate row…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

777 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question