Autor Beitrag
dr. rom4o
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59


TMT-Pascal, D3 Prof, C++Builder
BeitragVerfasst: Mi 02.06.04 02:45 
Hallo Leute,
ich habe gerade angefangen mit Delphi, und komme auch ganz gut voran.
Doch ich hab ein Problem, die Fenstergrössen meiner Programme kann ich
nicht fixieren.
Also wie geht das?????

ciao dr. rom4o

Moderiert von user profile iconTino: Titel geändert
Moderiert von user profile iconTino: Topic aus Sonstiges verschoben am Do 03.06.2004 um 11:41
smiegel
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 992
Erhaltene Danke: 1

WIN 7
D7 Prof., C#, RAD XE Prof.
BeitragVerfasst: Mi 02.06.04 08:42 
Hallo,

dazu musst Du Deiner Form eine WMGetMinMaxInfo-Message verpassen.

In der private-Eigenschaft der Form musst Du folgendes einfügen:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
  ...
  private
    procedure WMGetMinMaxInfo(var aMsg:TWMGetMinMaxInfo); message WM_GETMINMAXINFO;
  ...


Nicht vergessen, die Unit Messages in die uses-Klauses aufnehmen.

Im implementations-Teil folgt dann:
ausblenden Delphi-Quelltext
1:
2:
3:
4:
5:
6:
7:
8:
9:
procedure TForm1.WMGetMinMaxInfo(var aMsg:TWMGetMinMaxInfo);
begin
  with aMsg.MinMaxInfo^ do
  begin
    ptMinTrackSize:=Point(300200); // <--- Mindestgröße
    ptMaxTrackSize:=Point(640480); // <--- maximale Größe
  end// with
  inherited;
end// TForm1.WMGetMinMaxInfo


Hoffe, es hilft.

_________________
Gruß Smiegel
Ich weiß, daß ich nichts weiß, aber ich weiß mehr als die, die nicht wissen, daß sie nichts wissen. (Sokrates)
FaTaLGuiLLoTiNe
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 200
Erhaltene Danke: 5

Windows 7, Windows 8.1
Delphi XE
BeitragVerfasst: Mi 02.06.04 09:01 
TForm.Constraints? Oder TForm.BorderStyle vielleicht?

Mit Constraints kann man Minimal- und Maximalgrössen angeben, echtes Fixieren erreichst Du, indem du BorderStyle auf bsSingle oder bsDialog stellst. Ich denke mal das meintest Du damit, und nicht dass Du das Formular selber (die Position) fixieren willst:

dr. rom4o hat folgendes geschrieben:

Doch ich hab ein Problem, die Fenstergrössen meiner Programme kann ich
nicht fixieren.

_________________
<< FaTaLGuiLLoTiNe >>
Rhinoceroses don't play games!
dr. rom4o Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59


TMT-Pascal, D3 Prof, C++Builder
BeitragVerfasst: Mo 07.06.04 01:45 
Titel: Dank, aber noch eine erweiterte Frage
Hi Schmiegel,
danke erstmal für deinen Tip...es hat funktioniert, doch
deine empfohlene Variante funktioniert nur dann wenn ich
das fertige geöffnete Programm maximiere, doch im normalen
Modus kann ich die grösse der Fenster über die allseits bekannten
Scrollbalken weiterhin vergrössern.

Kann man das auch verhindern???????
Ein Beispiel der schöne kleine Windowstaschenrechner, seine Grösse
ist unveränderbar.

ciao

dr. rom4o
dr. rom4o Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 59


TMT-Pascal, D3 Prof, C++Builder
BeitragVerfasst: Mo 07.06.04 02:12 
Titel: okey jetzt ist alles klar
Also ich hab es jetzt auch nochmal mit
der Änderung von borderstyle auf single probiert
so erreiche ich das gewünschte Ergebnis.
Danke euch ciao...dr. rom4o
matze
ontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic starofftopic star
Beiträge: 4613
Erhaltene Danke: 24

XP home, prof
Delphi 2009 Prof,
BeitragVerfasst: Mo 07.06.04 10:22 
eine nadere möglichkeit wäre im onresizequery ereignis die variable canresize auf false zu stellen !

_________________
In the beginning was the word.
And the word was content-type: text/plain.