Printer Trays Hell, View Pro and Vb 6

Hi Everyone,

I am a Windows Applications developer.

Have you come across hell when trying to specify printer’s Paper Source Trays from Vb6 application? I have actually been to hell!

Problem:
VB 6
exposes a Printer object, which points to the currently active printer for the current user profile in Windows. You can manipulate this object directly and set the printer trays with easy. However, if you use a third party tool called ViewPro you may experience problems.

ViewPro hides the printer object and at times it passes the wrong values for the printer trays.

Cause
ViewPro exposes a property called ‘DefaultSource’ which is an Enum, whilst the printer tray Ids may not lie in the Enum definations

Result
Print jobs may not always print to the correct trays. You have to find ways of circumventing the ViewPro and print directly to the printer.

Regular Expressions

A regular expression (regex or regexp for short) is a special text string for describing a search pattern. You can think of regular expressions as wildcards on steroids. You are probably familiar with wildcard notations such as *.txt to find all text files in a file manager. The regex equivalent is .*\.txt

For more information on what are Regular Expressions(RE) and where to make use of them, please visit

http://www.codeproject.com/string/regex__.asp
http://www.regular-expressions.info/

RE are indeed a powerful tool that you can not live without. Give them a look today