Moving Default Frames

You can use the following code to make any frame movable:

/run local f=framename; f:SetMovable(true); f:EnableMouse(true); f:SetUserPlaced(true); f:SetScript("OnMouseDown", f.StartMoving); f:SetScript("OnMouseUp", f.StopMovingOrSizing);
You'll need to replace framename with the frame's global name. You can get that with:
/run print( GetMouseFocus():GetName() )

Which will print it into the chat.
This doesn't work on all frames, but should work on almost all the default UI's frames. I know for a fact it works on the basic unit frames.
(This will automatically save between each game session. Reload or relog to lock the frames into their new places.)

The text above was copied from a post by Neffi in the WoWInterface forums found here.