F.A.Q. - How do I add Close and Minimize buttons to my shaped form?

These buttons are not drawn automatically by Windows except on a titlebar. As this is not a suitable place to put them on a shaped form, they must be created manually, using image boxes. There are many ways of doing this, and you can either devise your own (which may or may not include 'click' effects), but the core code needed to reproduce the effects is:

Minimize: MainWin.WindowState = vbMinimized

Close: Unload MainWin

Where MainWin is the name of the form.

For an example of how to produce Close and Minimize buttons including code and the necessary bitmaps (obtained using screen shots) please download the example project Reversi