help needed, window sizing in DirectX 3D retained mode

I am writing an application that is not a game with DirectX.
This is my problem.
I have a ST Virge 3D graphics card with 4Mb.
I am creating a Direct3d device using CreateFromClipper.
My windows display is set for 1024 x 768 x 24 bit
I want to display a maximised window with menus etc etc and
have direct3d content but if I try this with any form larger
than about 600 x 600 I get an OutOfVideoMemory error.

By my calcs

4Mb                 = 4194304 bytes
1024 x 768 x 3 = 2359296 bytes

so why do I get out of memory?

Even if my calcs are wrong surely if windows can display
at this resolution, then directX can ?

I am using delphi 3.

Thanks in advance,  please also email any replies to :-

pavel...@dircon.co.uk

cheers