@WoF - Much appreciated for the code.

When i copied your code to form1.frm it was giving compiler errors.
I figured out that we have to add Private before 'Declare' keyword with the help of google.

Private Declare Function SetParent Lib "user32" (ByVal hWndChild As Long, ByVal hWndNewParent As Long) As Long

Thats it, it worked for me .