If you're running Windows XP, this is how to do it (It might also work for some earlier versions of Windows, but I'm not sure).\n1.  Click the Start button, then go to Control Panel.\n2.  If you're in Category View, click Performance and Maintenance, then Power Options. If you're in Classic View, simply click Power Options.\n3.  On the box that pops up, click the tab that says Advanced.\n4.  Under the Power Buttons section, where it says "When I press the power button on my computer" you can click the arrow to drop down a list of options.  It sounds like you would just want to choose the "Do nothing" setting.\n5.  Click OK.\n\nI hope that helps!  And I know how you feel by accidentally turning it off!  It can be frustrating.