Public Class Form1
Public BMP As New Drawing.Bitmap(900, 500)
Public GFX As Graphics = Graphics.FromImage(BMP)
Private Sub Form1_Load(sender As System.Object, e As System.EventArgs) Handles MyBase.Load
GFX.Clear(Color.White)
PictureBox1.Image = BMP
End Sub
Private Sub brem()
ArrBremX(IndexPoint) = ((Arrayx(IndexPoint) * 20) + 20)
Form1.GFX.DrawLine(Pens.Black, New Point(20, 200), New Point(ArrBremX(IndexPoint), 200))
Form1.PictureBox1.Image = Form1.BMP
Debug.Print("IndexPoint =" & IndexPoint)
End Sub