CrAzY hOuSe
Locos por la programación
Número de colores que soporta actualmente el dispositivo de Pantalla.
.net

Syndication

Indica el número de colores que soporta actualmente el dispositivo de Pantalla.

Crea un proyecto e inserta este código.

Option Explicit
'  Parámetros de dispositivos para GetDeviceCaps()
Const BITSPIXEL = 12         '  Número de bits por píxel
Const PLANES = 14            '  Número de planos
Private Declare Function GetDeviceCaps Lib "gdi32" (ByVal hdc As Long, ByVal nIndex As Long) As Long

Private Sub Form_Load()
    Dim Res As Long
    Res = (2 ^ GetDeviceCaps(Form1.hdc, BITSPIXEL)) ^ GetDeviceCaps(Form1.hdc, PLANES)
    MsgBox CStr(Res) & " colores."
End Sub

Posted sáb, ene 15 2000 15:27 by Maverick
Filed under: ,

Add a Comment

(optional)  
(optional)
(required)  
Remember Me?
MavericK
Powered by Community Server (Non-Commercial Edition), by Telligent Systems