You may have to remove drive K (i.e. make it unallocated space) to be able to combine it with the other unallocated space from the D shrink.
The shrink partition utility can only decrease the partition size down to the first unmovable/locked system file. To get round this, temporarily turn off System Restore, do the shrink and turn System Restore back on. Running a defrag may also move some of the ‘unmovable’ files.
Alternatively, you can shrink partitions by running the diskpart command from the Vista DVD.