I have an f# script using Windows Forms and I want it to run without showing console window (fsi.exe). Is it possible and how? Below is a script example. 
#r "mscorlib.dll"
#r "System.dll"
open System.IO
open System.Windows.Forms
let DoUsefulThing() = ()
let form = new Form()
let button = new Button(Text = "Do useful thing")
button.Click.AddHandler(fun _ _ -> DoUsefulThing())
form.Controls.Add(button)
form.ShowDialog()
as one option you can PInvoke and hide console window