Rated
Read 212,959 times
Contents
Related Categories
Printing in VB - Graphics Options
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) |
James first started writing tutorials on Visual Basic in 1999 whilst starting this website (then known as VB Web). Since then, the site has grown rapidly, and James has written numerous tutorials, articles and reviews on VB, PHP, ASP and C#. In October 2003, James formed the company Developer Fusion Ltd, which owns this website, and also offers various development services. In his spare time, he's a 3rd year undergraduate studying Computer Science in the UK. He's also a Visual Basic MVP.
Comments
Posted by bakuretsu on 27 Sep 2005
Can you tell me how to set the margins and printer orientation also using this method. It should work in VB .NET 2003 I'm assuming.
I need to be able to control the printer margins and headers and... -
Posted by vasanthi on 27 Sep 2005
[Hi,
Facing problem in printing from local printer connected to WinXp from VB6. I am able to capture Printer.devicename and thru this print to network printer. But when trying to print on Local pri... -
Posted by aadreja on 04 Jul 2005
hi suhaas
have u added new paper...
now go to properties of your generic printer..
in printing preferences select default paper instead of letter select ur created custom paper...
now open ...
Posted by suhaas on 04 Jul 2005
hi aadreja,
thanks for your reply.
I tried to do as per your reply. But this does not work with VB6. I am working on a invoice printing application where I am using Generic Text printer with VB6... -
Posted by aadreja on 04 Jul 2005
for setting custom paper size in xp
u have to create form...
go to start->settings->printers
in file menu go to "server properties"
create new from with desired paper size... and give name
n...
|