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
Post a Comment