gdi: prevents an AV if applications have a non-standard startup

I sometimes implement a "-h" help command line parameter to GUI and non-GUI
applications. For GUI applications it pops up a dialog that displays help
then quits before the main form displays. Without the change in this
commit, the GUI applications will trigger an AV, because MainForm = nil in
the code referenced in this commit.
Updates some the prototype projects with the latest framework API changes.
Fixed a minor spelling mistake
Adds a convenience function to the StyleManager class