bonjour à tous
j'ai créé une application qui permet d'inverser les couleur de l'écran.
cela fonctionne très bien (avec windows98; sans fond d'écran)
malheureusement, sous windows XP, l'écran apparais noir.
où est le problème ??
Voici mon code :
Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
 
procedure TForm1.Button8Click(Sender: TObject);
var
  x, y : dword;
  clr, col : tcolor;
  scrx, scry : integer;
   dc:hdc;
 
 begin
 dc := getwindowdc(getdesktopwindow);
 scrx := GetSystemMetrics(SM_CXSCREEN);
 scry := GetSystemMetrics(SM_CYSCREEN);
 
for x:=0 to scrx do
    begin
    for y:=0 to scry  do
    begin
 
 col:= getpixel (dc,x,y);
 
       if radiobutton18.checked then
       clr := 255-col;
 
application.Minimize;
    setpixel (dc, x,y,clr);
merci pour toutes pistes !