There is a console tool to manage your VirtualBox. You can run the command below to resize your virtual disk image size.
But don’t forget to expand the disk in virtual os, after you run this command. Windows 7 won’t be using the new size after that. You have to expand the size in Disk Manager of Windows.
VBoxManage modifyhd “Windows 7 Hard Disk.vdi” –resize 40960