AllAPI Network - The KPD-Team

 
Allapi Network
 API-Guide
 ApiViewer

 API List

 
API Resources
 Tips & Tricks
 VB Tutorials
 Error Lookup
 
Misc Stuff
 VB examples
 VB Tools
 VB Links
 Top Downloads
 
This Site
 Search Engine
 Contact Form
 

Donate to AllAPI.net

CreatePen

The CreatePen function creates a logical pen that has the specified style, width, and color. The pen can subsequently be selected into a device context and used to draw lines and curves.

VB4-32,5,6
Declare Function CreatePen Lib "gdi32" Alias "CreatePen" (ByVal nPenStyle As Long, ByVal nWidth As Long, ByVal crColor As Long) As Long

VB.NET
System.Drawing.Pen

Operating Systems Supported
Requires Windows NT 3.1 or later; Requires Windows 95 or later

Library
Gdi32

Parameter Information
fnPenStyle
Specifies the pen style. It can be any one of the following values:
PS_SOLID
Pen is solid.
PS_DASH
Pen is dashed. This style is valid only when the pen width is one or less in device units.
PS_DOT
Pen is dotted. This style is valid only when the pen width is one or less in device units.
PS_DASHDOT
Pen has alternating dashes and dots. This style is valid only when the pen width is one or less in device units.
PS_DASHDOTDOT
Pen has alternating dashes and double dots. This style is valid only when the pen width is one or less in device units.
PS_NULL
Pen is invisible.
PS_INSIDEFRAME
Pen is solid. When this pen is used in any graphics device interface (GDI) drawing function that takes a bounding rectangle, the dimensions of the figure are shrunk so that it fits entirely in the bounding rectangle, taking into account the width of the pen. This applies only to geometric pens.

nWidth
Specifies the width of the pen, in logical units. If nWidth is zero, the pen is a single pixel wide, regardless of the current transformation.

crColor
Specifies a color reference for the pen color.

Return Values
If the function succeeds, the return value is a handle that identifies a logical pen.

If the function fails, the return value is NULL.

Examples

Related Functions

No VB.NET Example Found

 

 


Copyright © 1998-2007, The Mentalis.org Team - Privacy statement
Did you find a bug on this page? Tell us!
This site is located at http://allapi.mentalis.org/