it is available in the CodeBase
I am sure
but forgot where
you can search
please read/research that the only way to learn in programming. The forum works best for quick short answers. You are asking something that takes much more writing to answer.
You should read article series by Anatoli Kazharski. He has written the indept how-to on creating panels from scratch. Good luck!