且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从Visual Basic PowerPacks绘制的线上绘制点?

更新时间:2022-10-15 15:19:35

最简单的方法就是按照我想的步骤进行操作



1 )如果没有固定点数,则添加标签的控制数组。

2)添加两个用于坐标输入的文本框,例如textX,textY

3)添加textchanged事件,输入以下代码



 textX.location =新系统.Drawing.Point(Val(txtX.Text),textX.location.Y)
折叠|复制代码
textY.location =新的System.Drawing.Point(textX.location.X,Val(txtY.Text))



试试这个并回复。


I have drawn the lines from the Visual Basic Power Pack. One is Horizontal and other is Vertical (like x-axis and y-axis) And now I want to add points on it from datagridview(which have two columns x-axis and y-axis). How can i draw points on it?

easiest way is following step as I think

1) Add control array of label if number of dots are not fixed.
2) Add two textbox for co-ordinates entry e.g. textX, textY
3) Add in there textchanged event, enter following code

textX.location = New System.Drawing.Point(Val(txtX.Text) , textX.location.Y)
 Collapse | Copy Code
textY.location = New System.Drawing.Point(textX.location.X,Val(txtY.Text))


try this and reply.