簡単な質問:
F# Interactive では、これは機能しません (ダイアログが表示されません)。
open System.Windows.Forms
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
最初に単純な MessageBox を実行した後、このコードは機能します。
open System.Windows.Forms
MessageBox.Show("Now it works!")
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
最初にフォームを表示した後、このコードも機能します。
open System.Windows.Forms
let frm = new Form()
frm.Show()
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
ただし、このコードはフォームを表示せず、メッセージ ボックスも表示しません。
open System.Windows.Forms
let dlg = new OpenFileDialog()
let res = dlg.ShowDialog()
MessageBox.Show("Now it does not work...")
OpenFileDIAlog が何かをブロックしているようです。他の形式のウォーム/ロードが最初にない場合、何がわかりません。
OpenFileDialog をすぐに機能させるアイデアはありますか?
Microsoft (R) F# 2.0 Interactive ビルド 4.0.40219.1 を使用
ありがとう、GJ