Hey there, rodion15.
You can never format the partition of the OS you've booted to. Even when the important system files are loaded into the RAM for faster access, this is something you lose as soon as you turn off the computer as RAM can't hold information since it's volatile.
Basically if you want to reformat the drive, just use Windows installation media (USB/DVD) and do that. Another option would be to go with Ubuntu Live USB/DVD and do it this way.
Hope that helps.
Boogieman_WD