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
Brandon
NA
3
0
Custom Colors- Visual C#
Apr 11 2007 3:27 AM
I am trying to, in a nutshell, make a button that when pressed, brings up a colordialog from which a user selects a color, then a pictureBox draws a circle of that color. I can get it to work on startup using; private void pictureBox1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { drawroutine(e.Graphics, Brushes.Red); } private void drawroutine(Graphics g, Brush b) { g.Clear(Color.White); g.FillEllipse(b, 0, 0, 130, 130); } and I imagine I could make this customizable on startup, but its not feasable. The code I have for the button so far is; private void button60_Click(object sender, EventArgs e) { ColorDialog cd = new ColorDialog(); cd.ShowDialog(); HatchBrush hb = new HatchBrush(HatchStyle.Percent50, cd.Color, cd.Color); } and from there I am totally lost. Ive done some googling and searching in this forum but havnt turned anything up. Any help is apreciated.
Reply
Answers (
1
)
Help with vector drawing problem
Wierd mp3-problems