我想设置我的身材的坐标。 我不明白如何设置值来获取所需的图像。
这是用户表单:
每当我输入值时,它都以我不想要的0,0
坐标开始。任何人都可以帮我解决我的代码吗?
Public Class Form1
Dim g As System.Drawing.Graphics
Dim pen1 As New System.Drawing.Pen(Color.Blue, 2)
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim p(4) As System.Drawing.Point
p(0).X = Val(AX.Text)
p(0).Y = Val(AY.Text)
p(1).X = Val(BX.Text)
p(1).Y = Val(BY.Text)
p(2).X = Val(CX.Text)
p(2).Y = Val(CY.Text)
p(3).X = Val(DX.Text)
p(3).Y = Val(DY.Text)
g = PictureBox1.CreateGraphics
g.DrawPolygon(pen1, p)
End Sub
End Class