Click here to Skip to main content
15,883,857 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Dear Codeproject members
i'm working on a project where i need to draw graphs from data of textboxes

i have 12 text boxes and 12 label
i need to draw twelve graphs that contain the data from one texboxe and label at same time , the data are changing each 50 ms , the whole number of data is in between 3000 and 4000.

i hope you'll help me.

thank you

best regards
Posted

Do not use control! (Possible, but so many projects were failed due to this wrong approach).
Do not use PictireBox. You can do it, but there is no need; no useful functionality from this control. You need to use a custom control, or a panel, even a form.
Here is how (see my solution):
How do I clear a panel from old drawing[^].

Alternative: use WPF. Everything you need it already fully implemented there plus a lot more.

—SA
 
Share this answer
 
Comments
Dzmoumou 4-Jun-11 18:35pm    
thank you
Sergey Alexandrovich Kryukov 4-Jun-11 20:38pm    
You're welcome.
Good luck, call again.
--SA
In order to draw you should use a PictureBox. Use the PictureBox Paint event to draw the graphics. After data is changed or on timer_tick you can force a redraw as follows: PictureBox.Invalidate();

Set Form.DoubleBuffered to true to prevent flickering.
 
Share this answer
 
Comments
Dzmoumou 3-Jun-11 19:54pm    
thank you
thatraja 3-Jun-11 23:46pm    
Spot on. 5!

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900