Press F2 option to enter setup

I have an laptop with Corei3 2.4 GHz processor and 4 GB amount of RAM. I am using windows 7 ultimate 64 bit operating system. Recently I noticed that my laptop doesn’t boot automatically anymore.
It always stops the operation after displaying the press f2 option to enter setup. After that, nothing happens anymore, the display remains black until I have to press any key. It’s only then that it continues to boot up and displays the OS.
I thought it was a software issue so tried to format the hard disk and so I did. After formatting the hard disk, the same problem occurs even if I changed the boot priority to the optical drive, still it does not continue booting unless I press any key on the keyboard. Please help me with this problem.
