>>But I noticed a problem with the focus thing. If the main form creates a dialog that is placed over the engine window, you will be unable to click a button in this dialog.
lol yeah that's indeed a problem, to fix this the dialog would have to somehow register itself to the focus handling piece of the code...
yepp the other solution is far easier in this regard ^^