I suspect you want to add some stratigically placed parens.

Rather than:

1
2
let test (form) : Form =
    form.Width <- 22

which defines a function taking <'a> and returning a form. Try this instead:

1
2
let test (form : Form) =
    form.Width <- 22

Same for this function:

1
2
let position_button (button:Button) =
    button.Location <- new System.Drawing.Point(0,0)

The other error is that you have a function which returns a value, but your code does nothing with the value. You can discard such values by piping the output to "ignore".

1
    fun _ -> System.Windows.Forms.MessageBox.Show(value.ToString()) |> ignore
By on 12/19/2007 1:40 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper