I have a program that should prevent the user from opening taskmanager and from openinig Start Menu. I have already added code to disable taskmanager and need now to prevent use
I'd suggest going with a policy but if you really need to do it programmatically you can try the following (not sure what versions of Windows this supports).
You'll have to search for the process that is the TaskBar, then you'll have to search through all it's threads to find the start button. This CodeProject article shows how to do it: Hiding the Taskbar and Startmenu (start orb) in Windows Vista
You might also have to create some keyboard hooks to disable the user opening the start menu via some keyboard combo.