This is the oldest question there ever was. The simple answer is: "You CAN'T hide your source code, period." However, I realize there are some people who would like to try. This FAQ will not criticize those users, it will provide information on how they can make it a little harder for users to look at their code. Elders - do not flame this FAQ. It is a very heavily requested topic whether it is right or not to hide your source code.
The first step is to remove the context menu from your webpage. The following code will stop the context menu from popping up when a user right-clicks the page. Insert this code after your <head> tag.
<script> <!-- document.oncontextmenu = new Function("return false"); //--> </script>
Another method is to load a Macromedia Flash file in a hidden frame. This doesn't mean to put an object tag in a hidden frame and load the Flash file that way, this means to load the actual SWF in the hidden frame. This has been known to disable the View->Source option in Internet Explorer's menu bar. I have not tested this with IE6 however.
As previously stated, hiding your source code will probably never be 100% possible, and the internet is (for the most part) designed to be open source. Please use the information in this FAQ only as a reference, not a tutorial.