Hola JXJ.
Te pongo una función que te permite manejar el brillo. Para el ejemplo usé un
TTrackBar que incrementa o decrementa el valor del argumento enviado, pero sin dificultad podés reemplazar su taréa por la combinación de teclas que desees:
Código Delphi
[-]
procedure TForm1.FormCreate(Sender: TObject);
begin
with TrackBar1 do
begin
TickStyle:= tsNone;
Min:= 1;
Max:= 255;
Position:= 100;
end;
end;
function AjustarBrillo(Brillo: Byte): Boolean;
var
DC: HDC;
lRamp: array[0..2, 0..255] of Word;
i, Delta: Integer;
begin
Result := False;
DC := GetDC(0); if DC <> 0 then begin
for i := 0 to 255 do
begin
Delta := i * (Brillo + 128);
if Delta > 65535 then Delta := 65535; lRamp[0, i]:= Delta; lRamp[1, i]:= Delta; lRamp[2, i]:= Delta; end;
Result := SetDeviceGammaRamp(DC, lRamp); ReleaseDC(0, DC); end;
end;
procedure TForm1.TrackBar1Change(Sender: TObject);
begin
AjustarBrillo(TrackBar1.Position);
end;
Un saludo.