Right click on computer icon select Properties, click on Advanced system settings. In the system properties go to Advanced tab, click on Settings button in Performance section, go to Advanced tab and click on Change button in Virtual memory section.
If you see no values in D: partition then there is no pagefile in D:.
If you see the D: drive with Page file size in MB (4096 or any other number), Select D: and click on No paging file and press Set button.
Make sure your C: drive has a paging file of sufficient size. You can use the recommended value shown in the bottom of this dialog box. Close all the windows by pressing the OK button. You will be asked to reboot for these new values to take effect.
After reboot again go back to the same screen as above and check to see there is no pagefile in D: drive. Now you may attempt to delete the partition.