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
soulfusion
NA
2
0
Back Color
May 16 2005 12:12 PM
Hi guys. I was just wandering...this proggi makes a sin graph across a form. I wanna know how to make half the background above the graph 1 color and below the graph another color. Heres da code so far. [STAThread] static void Main() { Application.Run(new Form1()); } private System.Windows.Forms.Timer timer1; private int myX = 0; private void Form1_Paint(object sender, System.Windows.Forms.PaintEventArgs e) { Graphics myGrap = e.Graphics; Point[] mySin = new Point[Width]; for (int x = 0 ; x < Width;x++) { mySin[x].Y = (System.Convert.ToInt16(System.Math.Sin(myX/5) * 10)) + (Width/3); mySin[x].X = x; myX++; } myGrap.DrawCurve(System.Drawing.Pens.Black,mySin,0); } //below is the timer code private void timer1_Tick(object sender, System.EventArgs e) { this.Invalidate(); } } Thanks alot Cheerz
Reply
Answers (
0
)
Handling System Events
Build webform/form dynamically (using xml, or other)