To be honest, look at your code, it is not going to be too easy: It looks like you refer to a number of controls, the location of which I do not know:
paneel
splitContainer
There may be more in the full version of your code, I don't know.
The normal way to do this kind of thing, would be to create a Custom Control and let it handle all the internals - the main form is then just responsible for handling the control as a single object.
However, that is a bigger subject than I want to go into here: Google will help with tutorials.