1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
Add-Type -AssemblyName Microsoft.VisualBasic $form = [System.Windows.Forms.Form] @{ Text = 'Mi formulario' } # Obtener la imagen que está en el Portapapeles, añadirla a una variable y después a un PictureBox $img = [Microsoft.VisualBasic.Devices.Computer]::new().Clipboard.GetImage() $PictureBox = [System.Windows.Forms.PictureBox] @{ SizeMode = "Autosize" Image = $img } $form.controls.add($PictureBox) $form.ShowDialog() |