From 5aadf69d8749fbe77fca89861a02d4b3d5cd55e0 Mon Sep 17 00:00:00 2001 From: Jaap Brasser Date: Sun, 11 Aug 2019 22:08:32 +0200 Subject: [PATCH] Surpressing output --- ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 b/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 index 0ce71fd..3716854 100644 --- a/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 +++ b/ConvertTo-Base64GUIExample/ConvertTo-Base64GUIExample.ps1 @@ -9,7 +9,7 @@ This function contains various examples of using the GUI capabilities of both Wi param( [string] $Title = 'Example Title...', - [validateset('VB')] + [validateset('VB','Forms')] [string] $GUIType = 'VB' ) @@ -20,7 +20,7 @@ param( [Microsoft.VisualBasic.Interaction]::MsgBox([convert]::ToBase64String([char[]]$_),0,$Title) } } - 'Windows.Forms' { + 'Forms' { $Form = New-Object System.Windows.Forms.Form -Property @{ Text = $Title Size = New-Object System.Drawing.Size(300,150) @@ -50,7 +50,7 @@ param( $Form.Controls.Add($FormInput) $Form.Controls.Add($FormOKButton) $Form.ShowDialog() | ForEach-Object { - [System.Windows.Forms.MessageBox]::Show([convert]::ToBase64String([char[]]$FormInputText),$Title) + [System.Windows.Forms.MessageBox]::Show([convert]::ToBase64String([char[]]$FormInputText),$Title) | Out-Null } } default {