Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Region Question

Status
Not open for further replies.

keyser456

IS-IT--Management
Nov 21, 2003
73
US
I'm working on a "line control" that will connect two points. I'm having problems with the region however. The region of the "line control" should really only be the line itself, however no line appears when I do the following (btw, the BackColor of the control is black, so as to see it, supposing I could it to work that is...):

Code:
GraphicsPath path = new GraphicsPath();
path.AddLine(pt1, pt2);
this.Region = new Region(path);
I know you can have a path that consists of only one line, but can you have a functional region that contains a path consisting of only one line? (it doesn't throw an error, but no line is visible) If it is possible, how thick is that line? Maybe the region is there (and possibly handles events) but you just can't see any line? I'm trying to avoid drawing lines because I really want to treat the line like an object.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top