Wrox Programmer Forums
C# Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old May 16th, 2006, 06:40 AM
Registered User
Join Date: Dec 2005
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
Default Draw Line

I have to draw line with the properties like in MS-WORD like Style and Weight. The Constructor of Pen class ask for Width of Pen in float. How can I relate width to Weight of line. Say I have to draw line of .75 pt then what will be the width of line...
Any idea??
Thanks in advance

"When I am working on a problem I never think about beauty. I only think about how to solve the problem. But when I have finished, if the solution is not beautiful, I know it is wrong."
- Buckminster Fuller (1895-1983)
Old May 18th, 2006, 08:35 AM
Registered User
Join Date: May 2006
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts

Pen p = new Pen(Brushes.Black, .75F);
            e.Graphics.DrawLine(p, Top, Left, Bottom, Right);
hope this helps !!

Similar Threads
Thread Thread Starter Forum Replies Last Post
draw line at form tyh Word VBA 0 December 7th, 2007 03:14 AM
How to draw indicator line in owc line chart AlexOo General .NET 0 July 9th, 2007 10:32 PM
Draw an "elastic" line zerna Visual C++ 0 March 5th, 2007 11:15 AM
draw line hussar91404 C# 1 August 11th, 2006 03:23 AM
Draw Line from coordinates marcin2k Access VBA 1 October 14th, 2005 01:41 PM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.