我需要从vb6转换为vb.net
public Form1()
{
InitializeComponent();
}
也从vb6到vb.net
(picturebox1.TextWidth(RsSearch.Fields(Fs.FieldName)) / 2)
也从vb6到vb.net
picturebox1.Line (x, y) - ((Width +x) / Reducer, (y+ Height) / Reducer), Fs.LineColor
在vb.net中对于图片框中的proprety hdc也意味着什么 picturebox1.hdc
答案 0 :(得分:1)
在vb.net中,您可以将Graphics类用于这些绘图功能,可以是Paint事件中的picturebox控件,也可以是picturebox图像上的持久图形。例如,绘制一条线:
Private Sub PictureBox1_Paint(sender As Object, e As PaintEventArgs) Handles PictureBox1.Paint
e.Graphics.DrawLine...
End Sub
或
Dim g As Graphics = Graphics.FromImage(PictureBox1.Image)
g.DrawLine...