Hi,
Below is the code which is used for drawing a graph in the winforms using C++
Kindly let us know the correct conversion for drawing the same graph using C# in a picturebox
pDC->MoveTo(x,y+int(height*10/11));
pDC->LineTo(x+int(wid),y+int(height*10/11));
Loading

VulpesRank #55 · 29.2K reputationPosted Apr 22, 2013, 2:09 AM EDT
Ensoi19 reputationPosted Apr 28, 2013, 10:45 PM EDT
The idea worked out for positive values of x&y.
We have one more clarification i.e., if y is -ve the line is not getting plotted inside the picturebox.
Kindly let us know how to set the -ve value in picture box
VulpesRank #55 · 29.2K reputationPosted Apr 29, 2013, 3:12 AM EDT
Points with negative co-ordinates will therefore be outside the picturebox.
You'll need to translate your co-ordinates so that they all fall within the positive xy quadrant in order to draw them within the picturebox.