I added to the wiki a code snippet that draws a frame into a panel bitmap. Hope it is helpfull.

wiki entry

Salud!