From your question, it appears that you may be destroying the instance of the TreeView and then your application creates it again when it reappears. For example there is a problem here:
public void CreateTreeview()
{
TreeView newTrview=new TreeView();
...
}
Your newTrview variable will go out of scope after this method completes and the control will be destroyed. You must be repeatedly creating it.
Declare your newtrview variable outside the CreateTreeview() method and then make a call to it like so:
TreeView newTrview = null;
public void CreateTreeview()
{
if(newTrview == null)
{
newTrview = new TreeView();
...
}
}
That should fix your problem. Always instantiate a control to a variable defined at a higher scope. The if-statement should then prevent your application from repeated creating the same TreeView control.