Skip to Content
Nov 28, 2013 at 01:22 PM

Using modal windows forms in B1 9.0


Hello all,

Our code to show a Windows dialog to open files (OpenFileDialog) in B1 has stopped working as of B1 version 9.0.

To bind the dialog to the B1 window, we obtain the latter using WinAPI's GetForegroundWindow(), and pass it as the owner window to OpenFileDialog.ShowDialog(owner).

It works well in B1 2004 to 8.8, but in 9.0 the ShowDialog() function returns immediately without showing the window. The existing threads on SCN recommend ether this method (using the B1 window as owner) or ugly workarounds, but the ScreenPainter addon has a correct open file dialog even in B1 9.0. Do you know how to contanct its developers with this question? So simple an operation should be no secret...