1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
# Crear un dibujo que contenga un rectángulo y dos líneas $pen = [Drawing.Pen]::new("red") $pen.Width = 5 $form = [System.Windows.Forms.Form]@{ Text = 'Mi formulario' Width = 500 Height = 550 } $form.add_paint({ $form.createGraphics().DrawLine($pen, 0, 0, 200, 200) $form.createGraphics().DrawLine($pen, 200, 0, 0, 200) $form.createGraphics().DrawRectangle($pen, 0, 0, 200, 200) }) $form.ShowDialog() |