Removing Blizzard default frames

General about hiding frames
To hide a frame, you have to enter the frame name, followed by the command :Hide

Example: MyFrame:Hide Hides a frame called "MyFrame".

If you use this in a Macro (not in an Addon), you have to add a /script-tag before: /script MyFrame:Hide

Show a hidden frame
MyFrame:Show

NOTE: Most frames have event handlers so even if you hide it, it can pop back up as a result of an event handler calling it's Show function. To avoid this you need to prevent the frame from getting these events or from executing the code that makes the frame show. Most Blizzard's frames (if not all) use the a single function to handle all events, which makes it easier for us. When hidding the frame you can make the OnEvent fucntion point to nill so no function gets called:

PlayerFrame:SetScript("OnEvent", nil); PlayerFrame:Hide;

And then restore the original function when you want to show the frame again:

PlayerFrame:SetScript("OnEvent", PlayerFrame_OnEvent); PlayerFrame:Show;

You will have to go through the code for each frame to get the exact functions, and with some (like target or pet) do some checks before actually showing it, i.e. Make sure the unit exists.

The following table lists the names of some frames that you may wish to hide or show, along with the Blizzard function used to hide them, if one is provided: