Autor Beitrag
DissA$teR!
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Do 29.03.07 10:38 
Hallo,

ich möchte, dass die Auflösung der Formulare meines Programmes automatisch beim Start an die Auflösung des Monitors angepasst wird.
Ich habe schon in der Suche nachgeschaut, aber keine passende Lösung gefunden.

Ich würde mich sehr freuen, wenn ihr mir schnell helfen könntet.


Danke im Voraus.
Paddii
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 28

WinXP Prof.
Blitz3D, PureBasic 4, Delphi 6
BeitragVerfasst: Do 29.03.07 10:50 
Wie wäre es, wenn du das Formular blatt Links oben am bildschirm ansetzt, also 0,0. Und dann Width und Height an ScreenWith und ScreenHeight anpasst.
Ich kenne den Befehl dafür nicht genau, aber ich glaube dann müsste das so aussehen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
procedure form1.FormCreate(blabla...)
begin
  Form1.Top := 0;
  Form1.Left := 0;
  Form1.Height := Screen.Height;
  Form1.Width := Screen.Width;
end;
ramBo
Hält's aus hier
Beiträge: 6

Windows XP

BeitragVerfasst: Do 29.03.07 10:51 
Ohr, benutz doch mal die Suche.
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Do 29.03.07 10:52 
Danke, probier ich mal aus. Und rambo, kannste nicht lesen, du Honk?
Paddii
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 28

WinXP Prof.
Blitz3D, PureBasic 4, Delphi 6
BeitragVerfasst: Do 29.03.07 10:54 
Ansonsten müsste der Befehl auch in der Hilfe stehen
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Do 29.03.07 10:55 
Du kannst auch mal bei Torry.net vorbei schauen, dort gibts schon fertige Komponenten die das automatisch für Dich regeln.
zb.
www.torry.net/quicks...amp;Next=Next+%3E%3E

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)
DOCa Cola
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 64

Vista x64
D2007
BeitragVerfasst: Do 29.03.07 10:59 
@Blackheart666
ich würde lieber mit aligns (und eventuell panels etc) arbeiten als mit diesen komponenten. das mit dem automatischen vergrößern und verkleinern der komponenten ist hat bei den komponenten die ich getestet habe nie richtig funktioniert. bei komplexeren formularen versagen diese nämlich schnell
DissA$teR! Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 17

Win XP
Turbo Delphi 2006
BeitragVerfasst: Do 29.03.07 11:03 
Na gut, das geht schon, aber ich meine das eher so, dass das formular und alle darin enthaltenen Objekte gestreckt, bzw. gestaucht werden, je nach bildschirmauflösung. Der Programmbildschirm soll also nicht über den "normalen" Bildschirm hinausgehen.

Edit: Sorry hab nicht gesehen dass ihr schon geantwortet habt.
Blackheart666
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 2195

XP
D3Prof, D6Pers.
BeitragVerfasst: Do 29.03.07 11:13 
Musst Du mal proben.
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:
26:
procedure TForm1.FormCreate(Sender: TObject);
const Breite=800{Auflösung, unter der das Fenster erstellt wurde}
  Hoehe=600;
var c,d,Schrift: integer;
begin
  schrift := pixelsperinch-96{Größe des Programms auch unter anderer Auflösung anpassen}
  if screen.width>breite then begin
    if schrift>0 then
      {für große Schriften}
      ScaleBy(round(((screen.width/breite)*100)-((screen.width/breite-1)*100)),100)
    else
      {für kleine Schriften}
      ScaleBy(round(((screen.width/breite)*100)),100);
  end
  else begin
    if screen.width=breite then
      ScaleBy(round(((screen.width/breite)*100)-schrift),100)
    else begin
      if schrift>0 then
        {für große Schriften}
        ScaleBy(round((100-(breite/screen.width-1)*100)-(breite/screen.width-1)*100),100)
      else
        {für kleine Schriften}
        ScaleBy(round((100-(breite/screen.width-1)*100)),100);
    end;
end;

_________________
Blackheart666
Der Irrsinn ist bei Einzelnen etwas Seltenes, - aber bei Gruppen, Parteien, Völkern, Zeiten die Regel. (Friedrich Nietzsche)