This was one of the more amusing bugs to locate:
Purpose: have the window be in a windows form so that I can add windows menus and handle key events via the form events.
Bug: original window is still created, all key events are handled in the original window and mouse events are also handled in the original window, on top of that the original window is created when it should never have gotten created to begin with!
Dim frm As New Form1
frm.Show()
oDBDisplay.OverrideHWND(frm.Handle.ToInt32)
oDBDisplay.SetDisplayMode(800, 600, 16)
oDBDisplay.SetWindowPosition(0, 0)
' Do what ever
' do your game loop
' kill the form when game is exiting
frm.Dispose()
Result will be that the game will load in the desired window, overlapping the window created by the engine, and the form will handle no events..
This is really funny to see.
On to the next bug discovery I go..