here is a better way if under windows 8.
go to disk management by pressing WinKey + X
then choose disk management
delete the ubuntu drives(extended partitions) must be two. make sure you dont delete recovery disks.
then extend your disk.
reboot your computer with your OS DVD OR BOOTABLE USB. under win8 select keyboard then language.
click next, then click on repair
select second option then click next
click cancel then select command
type "bootsect /nt60 /mbr" then press enter. please note this is only under win8. reboot
windows will attempt to repair wait or give it 4 min then reboot it. "simply press and hold power button untill system turns off.
after 5 sec turn it again and you are good to go.
please note bootsec that is being mentioned over the internet works under windows 7 and other previous windows versions not win8.
please correct me if i m wrong.