Saturday, March 5, 2016

Powershell create GUI form

[void][reflection.assembly]::LoadWithPartialName(“System.Windows.Forms”)
$form = new-object Windows.Forms.Form
$form.Text = “tech-jockey”
$button = new-object Windows.Forms.Button
$button.text=”Hello Jockey”
$button.Dock=”fill”
$button.add_click({$form.close()})
$form.controls.add($button)
$form.Add_Shown({$form.Activate()})
$form.ShowDialog()

No comments:

Post a Comment

Thanks for showing interest in tech-jockey.

Content of this blog has been moved to GITHUB

Looking at current trends and to make my content more reachable to people, I am moving all the content of my blog https://tech-jockey.blogsp...