Powershell "Clear or Remove Text Box" Button


is there way make system.windows.forms button can clear results out of field?

something like

$rbutton = new-object system.windows.forms.button
$rbutton.location = new-object system.drawing.size(122,550)
$rbutton.size = new-object system.drawing.size(110,40)
$rbutton.text = "view dhcp information"
$rbutton.add_click({rinfo})
$form.controls.add($rbutton)

i figured out.. nevermind.

for curious...

 

#clear button

$clearbutton = new-object “system.windows.forms.button”;
$clearbutton.location = new-object system.drawing.size(237,550)
$clearbutton.size = new-object system.drawing.size(110,40)
$clearbutton.text = "clear"
$clearbutton.add_click{$outputbox.clear()}
$form.controls.add($clearbutton)



Windows Server  >  Windows PowerShell



Comments

Popular posts from this blog

WIMMount (HSM) causing cluster storage to go redirected (2012r2 DC)

Failed to delete the test record dcdiag-test-record in zone test.com

Azure MFA with Azure AD and RDS