Printing in VB

Graphics Options

Both the Circle and the Line command allow you to specify the line colour, but you appear to have no control over the line width, what units the distances are measured in or any fill colours.

As all of these are fairly simply, they are explained briefly in the table below.

FillColor This specifies the fill color (in RGB) used, if any. Use the RGB function or vb colour constants to generate values for this.
FillMode This sets the pattern used to fill any shapes drawn by the Printer object. To see its possible values, hit F2, and select FillStyleConstants from the Classes list.
DrawMode The mode of drawing. Unless you know what you are doing, leave this to 13 - Copy Pen. Many of these settings yield unpredictable results depending on the colours on the screen. See DrawModeConstants in the object browser for its values.
DrawWidth The width of the drawing line
DrawStyle The style of the line. (ie solid, dotted etc). See DrawStyleConstants in the object browser for its values.
ScaleMode This specifies the units in which coordinates is measured. The default is twips (1,440 twips equal one inch)

You might also like...

Comments

About the author

James Crowley

James Crowley United Kingdom

James first started this website when learning Visual Basic back in 1999 whilst studying his GCSEs. The site grew steadily over the years while being run as a hobby - to a regular monthly audien...

Interested in writing for us? Find out more.

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“There are only two kinds of languages: the ones people complain about and the ones nobody uses” - Bjarne Stroustrup