I think the problem is that the partition you want to resize is mounted. Try doing the same thing from your Ubuntu live CD. I can't guarantee it'll work just like that, but it won't give you the same error.