如何将下面的画线语句改为.NET的语句
Public Class Form1Private Old_X As Single
Private Old_Y As Single
Private X As Single
Private Y As Single
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
End Sub
Private Sub Form1_MouseMove(ByVal sender As Object, ByVal e As System.Windows.Forms.MouseEventArgs) Handles Me.MouseMove
Picturebox1.Line (Old_X, 0)-(Old_X, Picturebox1.ScaleHeight), CrossColor
Picturebox1.Line (0, Old_Y)-(Picturebox1.ScaleWidth, Old_Y), CrossColor
'注释: 画新的光标线
Picturebox1.Line (0, Y)-(Picturebox1.ScaleWidth, Y), CrossColor
Picturebox1.Line (X, 0)-(X, Picturebox1.ScaleHeight), CrossColor
Old_X = X
Old_Y = Y
End Sub
Private Sub Form1_Resize(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Resize
PictureBox1.Top = 0
PictureBox1.Left = 0
PictureBox1.Width = Me.Width
PictureBox1.Height = Me.Height
End Sub
End Class --------------------编程问答-------------------- 主要是这几句识别不了啊
Picturebox1.Line (Old_X, 0)-(Old_X, Picturebox1.ScaleHeight), CrossColor
Picturebox1.Line (0, Old_Y)-(Picturebox1.ScaleWidth, Old_Y), CrossColor
'注释: 画新的光标线
Picturebox1.Line (0, Y)-(Picturebox1.ScaleWidth, Y), CrossColor
Picturebox1.Line (X, 0)-(X, Picturebox1.ScaleHeight), CrossColor
--------------------编程问答-------------------- Private Sub Button2_Click(sender As Object, e As EventArgs) Handles Button2.Click
Dim gra As Graphics = Me.CreateGraphics
Dim myPen As Pen = New Pen(Color.Red, 2) '颜色,线的粗细
gra.DrawLine(myPen, 1, 1, 100, 100) '直线
gra.DrawRectangle(myPen, 50, 60, 110, 120) '距形
gra.DrawArc(myPen, 50, 60, 60, 60, 60, 60) '弧线
gra.DrawEllipse(myPen, 280, 300, 200, 200) '圆
End Sub
补充:.NET技术 , VB.NET