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
TAN WhoAMI
NA
291
0
C# winform picturebox with a cross
Apr 22 2013 4:14 AM
Can anyone show me how to have a C# Winform Picturebox with a cross such that it divides into Left and Right area equally, as well as Top and Bottom area equally?
I have tried this, but does not work...
private void pictureBox1_Paint(object sender, PaintEventArgs e)
{
Graphics g = e.Graphics;
Point ptCurrent = new Point(0,0);
foreach (Point p in _points)
{
Point pt1 = new Point(p.X, p.Y - 10);
Point pt2 = new Point(p.X, p.Y + 10);
Point pt3 = new Point(p.X - 10, p.Y);
Point pt4 = new Point(p.X + 10, p.Y);
g.DrawLine(Pens.Black, pt1, pt2);
g.DrawLine(Pens.Black, pt3, pt4);
}
}
as suggested from
http://forums.codeguru.com/showthread.php?481124-how-to-mark-a-cross-on-the-picture-in-the-picture-box-using-c
Reply
Answers (
2
)
How to measure the response time from the keyboard?
Best printing method in C#?