Hmm evtl. gehts auch über eine interne Funktion vom VS, aber mir fällt jetzt nur die Möglichkeit über die DLLs ein.
// using System.Runtime.InteropServices;
[DllImport("gdi32.dll")] protected static extern int GetDeviceCaps(int hDC, int nIndex); [DllImport("user32.dll")] protected static extern int GetDC(int hwnd); [DllImport("user32.dll")] protected static extern int ReleaseDC(int hwnd, int hDC);
static void Farbtiefe() { int hDC = GetDC(0); int Pixels = GetDeviceCaps(hDC, 12); int x = ReleaseDC(0, hDC);
string rlt = ""; switch (Pixels) { case 1: rlt = "Monochrom"; break; case 4: rlt = "16 Farben"; break; case 8: rlt = "256 Farben"; break; case 16: rlt = "HighColor (16 Bit)"; break; case 32: rlt = "TrueColor (32 Bit)"; break; } }