declare integer FindWindow in win32api integer lvNotUsed, string lcWindowName declare integer GetDC in win32api integer lnHwnd declare integer GetDeviceCaps in win32api integer hDC, integer lnFlag #define BITSPIXEL 12 LOCAL lvVFPHwnd LOCAL lvHDC LOCAL lnColours *!* Get application WIN32 handle. lvVFPHwnd = FindWindow(0, _SCREEN.Caption) *!* Get a handle to the applcations display context. lvHDC = GetDC(lvVFPHwnd) *!* Calculate the number of colours available to use. lnColours = GetDeviceCaps(lvHDC, BITSPIXEL) do case case lnColours = 4 && 4bpp = 16 colours. case lnColours = 8 && 8bpp = 256 colours. case lnColours = 16 && 16bpp = 16k colours. case lnColours = 24 && 24bpp = True colour. case lnColours = 32 && 32bpp = 24 + Alpha Channel endcase