Reid Robbins
October 11th, 1999, 02:56 PM
I have finally gotten totally disgusted with the VB printer object. Since VB 4.0, it has been fraught with bug after bug. The worst problem has been (for me) that since SP 2.0, it is no longer possible to use API calls to bypass the VB printer object's manifest inadequacies. Specifically, I need to be able to use rotated print and from SP 2.0 on (in VB 5.0) to the current release (VB 6.0) the means detailed in KB article Q119673 no longer works "by design". Apparently, MS doesn't feel this is an essential ability. I do. The only workaround offered is to use API calls for ALL your printing since you can no longer mix API calls and VB functions within a single Device Context. Therefore, out of desperation, I have written my own printer object. I am offering it free for personal use to ANYbody who wishes to use it in exchange for its exposure and subsequent beating-upon in the interest of increasing its relability and robustness. New ideas are encouraged. It has the following new abilities and limitations:
NEW ABILITIES
1) There is a property "FontAngle" which allows the use of rotated print.
2) It offers a property, "DocumentName" which allows your document to appear in the print queue with a name other than "Microsoft Visual Basic".
3) It does not spontaneously lose and/or change font attributes as the VB object does.
4) It offers new methods "DottedLine", "DashedLine" and "DrawPointMarker" which aid in graphing. The VB object does not support dotted or dashed lines at more than a 1-pixel width, which my clients termed "wimpy" and "unreadable". The dotted and dashed lines produced by these methods are substantially bolder. The "DrawPointMarker" method produces a variety of markers like square, triangle, inverted triangle, circle, filled circle, cross, crossed ellipses to mark specific points of a graph.
5) The NewPage method does not cause the ejection of blank pages when a subsequent EndDoc method is invoked.
6) A new method "PrintEffect" allows the creation of printing in which the letters are outlined, created by lines radiating from a point, faded color (left-to-right or top-to-bottom), changing color (left-to-right or top-to-bottom) and letters created by a series of concentric ellipses.
LIMITATIONS:
1) You are calling DLL functions, not using VB, so syntax will be different in several instances (mostly with the "Print, "Circle" and "Line" methods). Nevertheless, most changes to existing programs retofitted can be done with search-and-replace, with some manual changes. For new development, it adds little to no burden on the developer.
2) VB refuses to believe in the existence of methods named "Print", "Line", "Circle" or "PSet" outside of its own objects. This object's corresponding methods are, therefore (out of necessity) "SPrint", "SLine", "SCircle" and "SPSet".
3) The "SPrint" method does NOT generate an automatic linefeed. You must use a subsequent "SPrint vbCrLf" to achieve this, unless you (like myself) are in the habit of always using CurrentX and CurrentY to do you positioning before each Print.
4) The SPrint method can also only accept a single string argument.
5) The Tab() argument to the Print method is not recognized.
Within these (as I have found them) minor limitations, this new object has finally set me free from the annoyance of problems MS seems unwilling to recognize, address--or fix.
If you would like to use this object, please let me know. For personal use, it is available without restriction. If you are a developer and would like to use it, it will be free for evaluation and if you want to incorporate it into a product, let's make a deal. I like money, but am primarily interested in getting the VB printer object's "monkey" off my own back.
Reid Allen Robbins
2205 E. Teton Blvd.
Green River, WY 82935
NEW ABILITIES
1) There is a property "FontAngle" which allows the use of rotated print.
2) It offers a property, "DocumentName" which allows your document to appear in the print queue with a name other than "Microsoft Visual Basic".
3) It does not spontaneously lose and/or change font attributes as the VB object does.
4) It offers new methods "DottedLine", "DashedLine" and "DrawPointMarker" which aid in graphing. The VB object does not support dotted or dashed lines at more than a 1-pixel width, which my clients termed "wimpy" and "unreadable". The dotted and dashed lines produced by these methods are substantially bolder. The "DrawPointMarker" method produces a variety of markers like square, triangle, inverted triangle, circle, filled circle, cross, crossed ellipses to mark specific points of a graph.
5) The NewPage method does not cause the ejection of blank pages when a subsequent EndDoc method is invoked.
6) A new method "PrintEffect" allows the creation of printing in which the letters are outlined, created by lines radiating from a point, faded color (left-to-right or top-to-bottom), changing color (left-to-right or top-to-bottom) and letters created by a series of concentric ellipses.
LIMITATIONS:
1) You are calling DLL functions, not using VB, so syntax will be different in several instances (mostly with the "Print, "Circle" and "Line" methods). Nevertheless, most changes to existing programs retofitted can be done with search-and-replace, with some manual changes. For new development, it adds little to no burden on the developer.
2) VB refuses to believe in the existence of methods named "Print", "Line", "Circle" or "PSet" outside of its own objects. This object's corresponding methods are, therefore (out of necessity) "SPrint", "SLine", "SCircle" and "SPSet".
3) The "SPrint" method does NOT generate an automatic linefeed. You must use a subsequent "SPrint vbCrLf" to achieve this, unless you (like myself) are in the habit of always using CurrentX and CurrentY to do you positioning before each Print.
4) The SPrint method can also only accept a single string argument.
5) The Tab() argument to the Print method is not recognized.
Within these (as I have found them) minor limitations, this new object has finally set me free from the annoyance of problems MS seems unwilling to recognize, address--or fix.
If you would like to use this object, please let me know. For personal use, it is available without restriction. If you are a developer and would like to use it, it will be free for evaluation and if you want to incorporate it into a product, let's make a deal. I like money, but am primarily interested in getting the VB printer object's "monkey" off my own back.
Reid Allen Robbins
2205 E. Teton Blvd.
Green River, WY 82935