# 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()


