Example
#light
open System
open System.Drawing
open System.Windows.Forms
// Create the main form
let form = new Form(ClientSize=Size(450,400))
// React to Mouse Move events on the form
let evtMessages =
form.MouseMove
|> Event.map (fun mi ->
mi.Location.ToString())
|> Event.map (sprintf "The position of the Mouse is %s")
|> Event.add(fun(a) -> form.Text <- a)
// Show the form
form.Show()
// Program eventloop
while form.Created do
Application.DoEvents()
Output

Join the conversation! Your thoughts help the community grow.