'programme qui trace 5 vues sur 180° devant le robot Imports System.IO Public Class Form1 Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button1.Click Dim x As Integer Dim y As Integer Dim Lignes() Dim myLines() As String = File.ReadAllLines(TextBox1.Text) PB.CreateGraphics.DrawLine(Pens.Black, 20, 280, 70, 280) 'les lignes ci-dessous juste pour dessiner l'échelle et écrire "50cm" PB.CreateGraphics.DrawLine(Pens.Black, 20, 277, 20, 282) PB.CreateGraphics.DrawLine(Pens.Black, 70, 277, 70, 282) Dim MyBrush As New SolidBrush(Color.Red) Dim StringFont As New Font("Verdana", 10) PB.CreateGraphics.DrawString("= 50cm", StringFont, MyBrush, 75, 270) For i = 0 To 4 'la boucle pour tracer les 5 vues Lignes = Split(myLines(i), ";") x = Lignes(2) + 260 y = Lignes(3) + 20 PB.CreateGraphics.DrawEllipse(Pens.Black, x - 2, y - 2, 4, 4) PB.CreateGraphics.DrawLine(Pens.Red, 260, 20, x, y) PB.CreateGraphics.DrawEllipse(Pens.Black, 255, 15, 10, 10) PB.CreateGraphics.DrawString(Lignes(0) + " cm", StringFont, MyBrush, x, y) Next End Sub Private Sub Button2_Click_1(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Button2.Click PB.CreateGraphics.Clear(Color.White) End Sub End Class