Autor Beitrag
mimi
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 19.06.03 17:31 
Hallo,
ich habe folgende funktion geschrieben:
ausblenden 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:
procedure SetFullWindow(s:Boolean);
begin
  Form1.GLXTimer1.Enabled:=False;
  if s = True then begin
    if Form1.GLXDraw1.Options <> [doFullScreen] then begin
      FullBild:=True;
      Form1.BorderStyle:=bsNone;

      Form1.GLXDraw1.Options:=[doAutosize] ;
      Form1.GLXDraw1.SetScreenMode;
      Form1.GLXDraw1.Initialize
    end;
  end
  else begin
    FullBild:=False;
    Form1.BorderStyle:=bsSingle;
    Form1.GLXDraw1.Options:=[doAutosize];
    Form1.GLXDraw1.SetScreenMode;
    Form1.GLXDraw1.RestoreWindow;
    Form1.GLXDraw1.Initialize;

  end;

  Form1.GLXTimer1.Enabled:=True; 
end;

die rufe ich einmal von onCreate auf und einmal mit strg+enter und warum sehe ich nur weiß bzw. grau und warum ändert er nicht die auflösung ?

_________________
MFG
Michael Springwald, "kann kein englisch...."
Nightmare_82
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 260



BeitragVerfasst: Do 26.06.03 17:15 
ausblenden Delphi-Quelltext
1:
    if Form1.GLXDraw1.Options <> [doFullScreen] then begin					


das muß mit Sicherheit heißen :
ausblenden Delphi-Quelltext
1:
if Form1.GLXDraw1.Options in [doFullScreen] then begin					


Options ist eine Menge und du fragst ab ob diese Menge nur aus doFullScreen besteht.

und das :
ausblenden Delphi-Quelltext
1:
Form1.GLXDraw1.Options:=[doAutosize] ;					

ist auch falsch, es muß heißen:
ausblenden Delphi-Quelltext
1:
Form1.GLXDraw1.Options:= Form1.GLXDraw1.Options + [doAutosize] ;					


also, wenn mich jetzt nicht alles täuscht, habe gerade kein Delphi da, vor allem beim 2. Teil bin ich mir nicht sicher, ob das mit Plus ging, aber wenn nicht wird das sicher jemand korrigieren.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 26.06.03 17:41 
also das mit dem plus das weiß ich, das man es machen kann, aber ich mache es auf die ander art:) es ist aber kein fehler:)
dein zweiten tipp werde ich mir gleich mal testen.
aber glaube das es daran liegt. weil ich sehe nämlich nichts auf dem bildschirm :( nur grau vom form :(

_________________
MFG
Michael Springwald, "kann kein englisch...."
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 26.06.03 17:46 
nun sieht der code so aus:
ausblenden 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:
procedure SetFullWindow(s:Boolean);
begin
  Form1.GLXTimer1.Enabled:=False;
  if s = True then begin
    if Form1.GLXDraw1.Options in [doFullScreen] then begin //1
      FullBild:=True;
      Form1.BorderStyle:=bsNone;

      Form1.GLXDraw1.Options:=[doAutosize] ;
      Form1.GLXDraw1.SetScreenMode;
      Form1.GLXDraw1.Initialize
    end;
  end
  else begin
    FullBild:=False;
    Form1.BorderStyle:=bsSingle;
    Form1.GLXDraw1.Options:=[doAutosize];
    Form1.GLXDraw1.SetScreenMode;
    Form1.GLXDraw1.RestoreWindow;
    Form1.GLXDraw1.Initialize;
  end

  Form1.GLXTimer1.Enabled:=True;  
end;

und es gibt eine complier fehlermeldung
// 1
Zitat:

[Fehler] Unit1.pas(53): Inkompatible Typen: 'TGLXDrawOptions' und 'TGLXDrawOption'
[Fataler Fehler] Project2.dpr(12): Verwendete Unit 'Unit1.pas' kann nicht compiliert werden

_________________
MFG
Michael Springwald, "kann kein englisch...."
Terra23
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 872

Win 8
Delphi 7
BeitragVerfasst: Do 26.06.03 19:44 
Nur mal eine Frage: Warum rufst du nicht einfach

ausblenden Delphi-Quelltext
1:
2:
Form1.Height:=Screen.Height;
Form1.Width:=Screen.Width;


auf? Oder verstehe ich was falsch?

PS: Hat der Quellcode funktioniert? -> Memory

_________________
Hasta La Victoria Siempre
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Do 26.06.03 20:04 
du versteht was falsch, mit deinem code veränder ich nur die größe des formuls aber ich will ja alles ändern auch die grafiken die ich verwende. openGl hat einen eingen fullbild mods....

PS:
habe dir ne mail gesendet:)

_________________
MFG
Michael Springwald, "kann kein englisch...."
Nightmare_82
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 260



BeitragVerfasst: Fr 27.06.03 00:29 
ausblenden Delphi-Quelltext
1:
2:
    if  doFullScreen in Form1.GLXDraw1.Options then begin //1
    {...}

so rum gehts

aber ich denke schon daß das falsch ist:
ausblenden Delphi-Quelltext
1:
Form1.GLXDraw1.Options:=[doAutosize] ;					


weil du mit der Zeile alle Options aus der Menge löschst und nur AutoSize reinmachst. Dann ist auch doFullScreen draußen. Ich habe aber lang kein DelphiX mehr programmiert, deswegen kanns gut sein daß es auch so geht.
mimi Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3458

Ubuntu, Win XP
Lazarus
BeitragVerfasst: Fr 27.06.03 18:05 
das ist kein delphiX das ist GLXTREMM

_________________
MFG
Michael Springwald, "kann kein englisch...."