Simple question:
In F# Interactive, this does not work (it shows no dialog):
open System.Windows.Forms
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
This code does work, after I first do a simple MessageBox:
open System.Windows.Forms
MessageBox.Show("Now it works!")
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
This code also works, after first showing a Form:
open System.Windows.Forms
let frm = new Form()
frm.Show()
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
This code however does not show any forms, not even the Messagebox:
open System.Windows.Forms
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
MessageBox.Show("Now it does not work...")
It seems the OpenFileDIalog blocks on something, if it does not have some other form warm/ load something first, no idea what.
Any ideas what would make the OpenFileDialog work straight away?
Using Microsoft (R) F# 2.0 Interactive build 4.0.40219.1
Thanks, GJ