1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
$form = [System.Windows.Forms.Form] @{ Text = 'Mi formulario' } $button = [System.Windows.Forms.Button] @{ Text = 'Pulsar' Location = New-Object System.Drawing.Point(10,40) } $TextBox = [System.Windows.Forms.TextBox] @{ Text = "Introduzca proceso para arrancar" Size = New-Object System.Drawing.Size(260,40) } $button.add_Click{ Start-Process $TextBox.Text } $form.Controls.Add($button) $form.Controls.Add($TextBox) $form.ShowDialog() |