From: souhail s. <sou...@ya...> - 2009-03-11 22:59:10
|
hello, I need to draw a curve on my application from a database. so to make it easy i download a graphical component from this link http://www.vbfrance.com/codes/COURBE-2D-SANS-MSCHART_35511.aspx my goal is to draw a line when I click on the mouse. i try to do it, but it doesn't works. i add in the program code in : <<<OnMouseClick(ByVal e As System.Windows.Forms.MouseEventArgs)>> Dim mousePt As Point mousePt = New Point(e.X, e.Y) If (rgraph.Contains(mousePt)) Then //rgaph is the rectangle that the component use it isImageClicked = True and in : <<OnPaint(ByVal e As PaintEventArgs) MyBase.OnPaint(e) >> Dim rectA As Rectangle = New Rectangle(10, 10, 333, 333) If (isImageClicked = True) Then e.Graphics.DrawRectangle(Pens.Black, rectA) So it doesn't work. please tell me if there is a solution for my problem? or please tell me if you know another graphical component that offers the function of on mouse click and thanks in advance. |