Instructions
Right-click on the Steam icon in the notification area of your Windows task bar and select "Library."
Right-click on "Team Fortress 2" in the left pane and select "Properties," then click on the "Set launch options" button.
Type "-dxlevel" in the field (without quotation marks), followed by a space and the version of DirectX you want TF2 to use. If you want to use DirectX 9.0, you can select any number between 96 and 99 for optimal quality, 95 for higher quality or 90 for medium quality. If you prefer to use DirectX 8, you can either type 81 for higher quality or 80 for regular quality. Finally, if you want to use DirectX 7, you can type 70. As an example, if you want to use DirectX 7, simply type "-dxlevel 70" in the field.
Click "OK" and then click "Close" to confirm your new DirectX settings.