Cannot Get to UEFI BIOS in Dell Optiplex 3040

I’ve got an Dell OptiPlex 3040 and I wanted to change something in the UEFI BIOS settings.
Restarting and hitting F2 during startup is the normal way to go. But, when restarting and hitting F2, I never came to the UEFI BIOS setup.
Sometimes, the computer just started Windows, sometimes the computer hang and just showed me black screens for a quarter of an hour or so
and then started Windows.

Ok, I thought, search the net for it. I came to a site which describes
how to reboot directly to the UEFI BIOS without hitting F2.
I tried that one, but to no avail: the result now always was that the computer hang for or a quarter of an hour or so and then started Windows.

I don’t even remember how I found the solution, but the solution is:

Remove the graphics card. Use on-board graphics adapter.

Explanation: The computer was in the UEFI BIOS, it just didn’t show it on the connected screens. Strange, but true: connecting a screen to the on-board graphics adapter without removing the graphics card did not help.

Remark: I’ve got a graphics card with two ports, an AMD Radeon HD 6450. I don’t know if the problem occurs with graphics cards with a single port.