To disable a control in the control panel, it can be done programmatically using
Control.ControllCollection.Remove()
But to disable Control Panel access to any user, itz possible thro registry editor. If you want to do it manually, just follow the below steps. If you want to write a program, re write into C# code.
Get keys KEY_CURRENT_USER\SOFTWARE\Microsoft\Windows\CurrentVersion\Policies.
Get string value NoControlPanel.
If (string value not found)
Add under Policies Key.
Update string value to 1 for Disable; 0 Enable.