|What you are describing is a hardware problem....the touchpad is part of the entire palm rest assembly, and twisting the case is causing the ribbon cable that connects the touchpad to the motherboard to short against something else inside the case. It sounds like you might be better off disabling the touchpad altogether.|
To disable the touchpad, or just the buttons, go into Control Panel and look for either a separate touchpad applet, or if there isn't one, open the mouse properties applet and look for the touchpad tab. As an alternative, you can access Device Manager (through Control Panel) and find the touchpad tab there and right click it, then check "disable" - don't try to uninstall it as it'll just reinstall itself the next time you boot up the computer.
Then hookup either an external mouse or a wireless mouse and use that instead. If you go this route find the touchpad applet / tab and look for a line that reads something along the lines of: "Disable touchpad when external mouse is present". If you can handle it, I'd recommend a mini optical wired mouse to a USB port as sometimes laptops have problems recognizing a wireless mouse.
This isn't exactly what you asked for, but short of an expensive repair, or disassembling the entire laptop (hard drive, case, keyboard, display screen and the motherboard in order to replace the shorting cable), I don't know of any other realistic option.