TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
sailorfoley
NA
97
0
Incorrect Co-Ordinates????
Nov 9 2003 6:58 PM
hey i am trying to draw lines on a panel based on the panel's co-ordinates.i'm creating new Points and passing them to the Drawline method of graphics.I have to re-arrange the co-ordinates ridiculously to make the lines fit inside the panel.am i doing something wrong? Here is the code: int pointTop = panel1.Top - 60; int pointBottom = panel1.Bottom - 85; int pointLeft = panel1.Left + 75 ; int pointRight = panel1.Right - 137 ; Point horTopLeft = new Point(panel1.Left - 15,panel1.Top - 15 ) ; Point horBottomLeft = new Point(panel1.Left -15,panel1.Top + 30 ) ; Point horTopRight = new Point(panel1.Right - 50,panel1.Top - 15) ; Point horBotRight = new Point(panel1.Right - 50,panel1.Top + 30 ) ; brush = new SolidBrush(Color.Black) ; myPen = new Pen(brush,5) ; topLeft = new Point(pointLeft,pointTop) ; topRight = new Point(pointRight,pointTop ) ; bottomLeft = new Point(pointLeft,pointBottom) ; bottomRight = new Point(pointRight,pointBottom) ; //Vertical Lines g.DrawLine(myPen,topLeft,bottomLeft) ; g.DrawLine(myPen,topRight,bottomRight) ; //Horizontal Lines g.DrawLine(myPen,horTopLeft,horTopRight) ; g.DrawLine(myPen,horBottomLeft,horBotRight) ;
Reply
Answers (
0
)
Using DxVBLib I get COM object with CLSID {xxx} is either not valid or not registered
How to read propertyItem from Jpeg file Set with Windows Explorer.