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()

Published Monday, October 17, 2005 3:37 PM by martin
Filed under:

Comments

# re: How to create GUI in Monad?

Is there any way to make the GUI in focus as well? Not good for users if they dont se the window pop up. :)

Thursday, January 26, 2006 4:46 AM by CrazyMatt

Leave a Comment

(required) 
(required) 
(optional)
(required)