Please note that distibuting just that one DLL with your program is against the license agreement of the DirectX SDK. Copying the DLL is good for a quick test, to see if your program works on the other computer, but it should not be regarded as a final installation procedure. Also, you may need more files than that to make your program work on another machine.
There is a text file in your SDK installation which tells you what files you need to distribute at least. If you installed the SDK to the default path, then it is here:
C:\Program Files\Microsoft DirectX SDK (August 2007)\Documentation\License Agreements\directx redist.txt
The redistributable files are in this directory:
C:\Program Files\Microsoft DirectX SDK (August 2007)\Redist\
Try this. Copy the files from the Redist directory which are mentioned in the license agreement:
DSetup32.dll
DSetup.dll
DXSetup.exe
DXupdate.cab
dxdllreg_x86.cab
and the package file that contains the usually missing d3dx9_35.dll:
AUG2007_d3dx9_35_x86.cab
The size of all this is about 4 MB, you can put it on a pen drive. Then on the other computer, start the DXSETUP.exe. It should install the core files of this DirectX version into the Windows directory and register them, so if you want to use several Dark GDK programs on a machine, they will all use the same DLL instead of each having their own copy of it.
This procedure - just like copying the dll - will only work if the other computer already has a later version of DirectX 9 installed. That is true for most machines, but if you are not sure or if this does not work, then copy the whole Redist directory and run the setup from the complete installation set. In fact, that is what you should always do, but the size of the whole installation set is about 62 MB, that is why I started experimenting with this reduced set which - I hope - complies with the license agreement and works in most cases. I'm not sure if you will need other packages from the installation set for programs that use more features of DirectX, or if you install on 64-bit Windows version, or on a machine that has DirectX 10 but not 9... If in doubt, use the complete set.
Note that, if the other computer never had a program installed which was developed with that version of Visual Studio that you are using, then you will need to install the Visual Studio redistributables as well. If you try to run your program and you receive "error in running application" or "manifest error" or some similar weird message (but not dll error), you probably need to install these. Just like DirectX, you install these only once and then all programs can use them. For example, here is the link to the VS 2008 Service Pack 1 redistributable:
http://www.microsoft.com/downloads/details.aspx?displaylang=en&FamilyID=a5c84275-3b97-4ab7-a40d-3802b2af5fc2
If you use another version (like without service pack) then search the Microsoft site for the correct download.
About compiling in debug/release mode: you should compile in release mode when you distribute the game on other computers, because debug information does not make much sense if you are running the program outside the debugger, it just increases the size and makes performance worse. If your friends have the complete development environment, then they can make use of debugging but then they might as well compile the program for themselves from source code.