thanks alot DumasS , i think it can be usefull .

and thats another code :

[pascal]procedure TForm1.setscreen(width,hight,deep:integer);

Var OldVal: _devicemodeA;
index:integer;
Begin
index:=1;
While EnumDisplaySettings(nil, i, OldVal) do
begin

if OldVal.dmPelsWidth=width then
if OldVal.dmPelsHeight=hight then
if OldVal.dmBitsPerPel = deep then begin
If EnumDisplaySettings(nil, i, OldVal) Then
ChangeDisplaySettings( OldVal, 0);
break;
end;
I:= I+1;
end;
end;[/pascal]