How to create GUI in Monad?
Hey guys! Sometimes you need to create some GUI - msgbox, inputbox etc... Till now it was really problem if you needed something more advanced - for example checkboxes etc. With Monad it is quite easy! And thats because you can use .net... In fact it is similar to creating normal program!
[Reflection.Assembly]::LoadWithPartialName(”System.Windows.Forms”)
$Form = New-Object System.Windows.Forms.Form
$Button = New-Object System.Windows.Forms.Button
$Form.Text = “You didnt clicked yet”
$Button.Text = “Click here!”
$Button.Add_Click({$Form.Text = “You clicked!})
$Form.Controls.Add($Button)
$Form.ShowDialog()