Need help to create a minimize and restore button in popup

I am going to build a popup window. The window task is about complete. I have made it with TPMooPopUp . You can see my working here: [URL=“”]

Problem is, now i need to make 2 button, One is to minimize the window and another is to restore it.
I am thinking how it can be done.

Thanks in advance for your time.