Autor Beitrag
JoelH
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Do 25.03.04 10:03 
Ich würd mir gerne eine Batch Datei oder Delphiprogramm basteln das mir die Auslösung von 800x600 nach 1024x800 wechselt bzw. eine die das wieder zurückbastelt.

System :
WinXP

Warum das ganze ? Ich muss meine Programme auf beiden Auflösungen testen und das via Menue zu ändern ist lästig auf die Dauer!

_________________
mfg. Joel
iGoA
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 103

Alle Win´s
D5 Prof
BeitragVerfasst: Do 25.03.04 10:24 
Bei vielen Grafikkartentreibern nistet sich im SystemTray so ein Icon ein. Wenn man draufklickt, kann man mit einem Klick die Auflösung wechseln. Normalerweise deaktiviert jeder das Ding sofort, weil ja zehntausen "sinnsole" Icons im SystemTray nerven, aber vielleicht kannst Du das für diesen Zweck wieder aktivieren. Frag mich aber nicht wie! (Vielleicht gibt´s das bei Dir auch gar nicht. War nur ne Idee)
tmc2004
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 140

zuviele
D7,D8
BeitragVerfasst: Do 25.03.04 10:58 
Da kann dir dieser Code bestimmt weiterhelfen. Hab ihn mal irgendwo gefunden

ausblenden volle Höhe Delphi-Quelltext
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:
26:
27:
28:
29:
30:
31:
32:
33:
34:
35:
36:
37:
38:
39:
40:
41:
42:
43:
44:
45:
46:
47:
48:
49:
50:
51:
type 
  Rueckmeldung = record 
    permiss: byte; 
    DMode: _devicemodeA; 
  end; 
 
function AufloesungTesten(sizex, sizey, FarbTiefe: DWord): Rueckmeldung; 
var DevMode: _devicemodeA; 
  i: Integer; 
begin 
  i := 0; 
  Result.permiss := 0; 
  DevMode.dmSize := sizeof(_devicemodeA); 
  while EnumDisplaySettings(nil, i, DevMode) do begin 
    with DevMode do 
      if (dmPelsWidth = sizex) and (dmPelsHeight = SizeY) and 
        (dmBitsPerPel = FarbTiefe) then begin 
        case ChangeDisplaySettings(DevMode, CDS_TEST) of 
          DISP_CHANGE_RESTART: begin Result.permiss := 1; 
              Result.DMode := DevMode; 
            end; 
          DISP_CHANGE_BADFLAGS, DISP_CHANGE_FAILED, DISP_CHANGE_BADMODE, 
            DISP_CHANGE_NOTUPDATED: 
            exit; 
        else begin Result.permiss := 2; 
            Result.DMode := DevMode; 
          end; 
        end; 
        exit; 
      end; 
    Inc(i); 
  end; 
end; 
 
procedure TForm1.Button1Click(Sender: TObject); 
var 
  waagerecht, senkrecht, FarbBits: DWord; 
  erg: Rueckmeldung; 
begin 
  waagerecht := 800; 
  senkrecht := 600; 
  FarbBits := 16; // 8,16,24,32 
  erg := AufloesungTesten(waagerecht, senkrecht, FarbBits); 
  case erg.permiss of 
    0: begin showmessage('Umschalten nicht möglich'); 
        exit; 
      end; 
    1: showmessage('Neustart erforderlich'); 
  end; 
  ChangeDisplaySettings(erg.DMode, CDS_UPDATEREGISTRY) 
end;

_________________
it's not a bug it's a feature
patrick
ontopic starontopic starontopic starontopic starontopic starofftopic starofftopic starofftopic star
Beiträge: 1481

WIN2k, WIN XP
D6 Personal, D2005 PE
BeitragVerfasst: Do 25.03.04 12:15 
schuppdiewupp...
source zum auflösung ändern:
www.swissdelphicente.../showcode.php?id=158

_________________
Patrick
im zweifelsfall immer das richtige tun!!!
JoelH Threadstarter
ontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic starofftopic star
Beiträge: 806
Erhaltene Danke: 17

Win10
Delphi Alexandria 11.2 Patch 1
BeitragVerfasst: Do 25.03.04 13:11 
Titel: hmm,
dank euch, Code 1 funktioniert ideal :)

_________________
mfg. Joel