f# - Code that runs correctly in FSI doesn't run correctly when project is run -


I am an F # noob and the learning curve has been fast, most of the reasons do not have to understand why things Are not working

Here's some simple code that updates a progress bar that works in FSI (at least the application. Current line).

  Open System Open Systems. Open Windows. Firmation System. Forrest = New Form (Top-Mist = True, Visual = True) PB = New Progress Bar (Minimum = 0, Max = 15, Doc = Dok Style. Control. Add (PB) ThreadFunk () = Thread Sleep (5000) I = 0 to 15 threads. Sleep (1000) pb.Invoke (verb (fun _ - & gt; pb.Value & lt; - i)) & gt; This thread = thread = thread = thread (threadfank) threads. Start () [& lt; STAThread & gt;] applications. Run (form)   

This code is a window with a progress bar that does not update when I try to run the project and run from the debugger, and then crash it happens.

I'm not sure why this works, but before making your code Enable the application. Enable visual style () .

Comments